3bb0c922b7574d96b1ded4b027ab8236b8c7bfb7 — Xinglu Chen 4 months ago aa7d007
gnu: ‘listof’ -> ‘list-of’.

* gnu/home-services-utils.scm (listof): Rename to ...
(list-of): ... this
(listof-strings?): Rename to ...
(list-of-strings?): ... this.
* gnu/home-services/emacs.scm (packages?): Use ‘list-of’ instead of ‘listof’.
* gnu/home-services/ssh.scm (listof-ssh-host-or-ssh-match?): Rename to ...
(list-of-ssh-host-or-ssh-match?): ... this.
(serialize-listof-ssh-host-or-ssh-match): Rename to ...
(serialize-list-of-ssh-host-or-ssh-match): ... this.
(home-ssh-configuration): Use ‘list-of’ instead of ‘listof’.
* gnu/home-services/version-control.scm (git-ignore?): Likewise.
(home-hg-configuration): Likewise.
(home-hg-extension): Likewise.
* gnu/home-services/web-browsers.scm (listof-icecat-profile?): Rename
to ...
(list-of-icecat-profile?): ... this.
(home-icecat-configuration): Use ‘list-of’ instead of ’listof’.
* gnu/home-services/xdg.scm (desktop-entries?): Likewise.

Suggested-by: Andrew Tropin <andrew@trop.in>
M gnu/home-services-utils.scm => gnu/home-services-utils.scm +5 -5
@@ 39,8 39,8 @@


@@ 369,7 369,7 @@ elements: the section and the subsection."

(define alist? list?)

(define (listof pred?)
(define (list-of pred?)
  "Return a procedure that takes a list and check if all the elements of
the list result in @code{#t} when applying PRED? on them."
    (lambda (x)

@@ 377,8 377,8 @@ the list result in @code{#t} when applying PRED? on them."
          (every pred? x)

(define listof-strings?
  (listof string?))
(define list-of-strings?
  (list-of string?))

;;; Miscellaneous.

M gnu/home-services/emacs.scm => gnu/home-services/emacs.scm +1 -1
@@ 21,7 21,7 @@

(define packages? (listof package?))
(define packages? (list-of package?))

(define serialize-packages empty-serializer)
(define serialize-boolean empty-serializer)

M gnu/home-services/ssh.scm => gnu/home-services/ssh.scm +5 -5
@@ 77,8 77,8 @@
  (serialize-field field-name (boolean->yes-or-no val)))

(define serialize-string serialize-field)
(define (listof-ssh-host-or-ssh-match? val)
  (listof (lambda (val)
(define (list-of-ssh-host-or-ssh-match? val)
  (list-of (lambda (val)
            (or (ssh-host? val)
                (ssh-match? val)))))

@@ 136,7 136,7 @@ as the @code{default-options} field in @code{home-ssh-configuration}."))
        #$(serialize-alist #f options)))))

(define (serialize-listof-ssh-host-or-ssh-match field-name val)
(define (serialize-list-of-ssh-host-or-ssh-match field-name val)
         #$@(map (lambda (entry)
                (if (ssh-host? entry)

@@ 153,7 153,7 @@ as the @code{default-options} field in @code{home-ssh-configuration}."))
   "The name of the default host."
   (lambda (field-name val) (serialize-field 'host val)))
   (listof-strings '("~/.ssh/known_hosts"))
   (list-of-strings '("~/.ssh/known_hosts"))
   "One or more files to use for the user host key database."

@@ 200,7 200,7 @@ Include /some/path/to/file
   (lambda (field-name val)
     (serialize-alist field-name val #:toplevel? #t)))
   (listof-ssh-host-or-ssh-match '())
   (list-of-ssh-host-or-ssh-match '())
   "List of configurations for other hosts.  Something like this:


M gnu/home-services/version-control.scm => gnu/home-services/version-control.scm +7 -7
@@ 105,7 105,7 @@
  #~(string-append #$@(append-map serialize-git-section val)))

(define (git-ignore? patterns)
  (listof-strings? patterns))
  (list-of-strings? patterns))
(define (serialize-git-ignore field-name val)
  (string-join val "\n" 'suffix))

@@ 256,17 256,17 @@ of the configuration file."))
    (package mercurial)
    "The Mercurial package to use.")
   (listof-strings '())
   (list-of-strings '())
   "List of regular expressions to ignore globally.  The default syntax
is Python/Perl-style regular expression (see @command{man 5 hgignore}).

The @code{*-ignore} fields are equivalent to adding @code{ui.ignore =
/file/with/ignore/rules} in your @file{hgrc}.")
   (listof-strings '())
   (list-of-strings '())
   "List of globs to ignore globally.")
   (listof-strings '())
   (list-of-strings '())
   "List of @dfn{rootglobs} to ignore globally.")
   (ini-config '())

@@ 379,13 379,13 @@ will turn into this:

(define-configuration/no-serialization home-hg-extension
   (listof-strings '())
   (list-of-strings '())
   "List of regular expressions to ignore globally.")
   (listof-strings '())
   (list-of-strings '())
   "List of glob expressions to ignore globally.")
   (listof-strings '())
   (list-of-strings '())
   "List of @dfn{rootglobs} to ignore globally.")
   (ini-config '())

M gnu/home-services/web-browsers.scm => gnu/home-services/web-browsers.scm +3 -3
@@ 46,8 46,8 @@

(define %icecat-config-path "mozilla/icecat")
(define (listof-icecat-profile? val)
  (listof icecat-profile?))
(define (list-of-icecat-profile? val)
  (list-of icecat-profile?))

(define-configuration icecat-profile

@@ 83,7 83,7 @@ details on how to customize the look and feel of IceCat.")
    (package icecat)
    "The IceCat package to use.")
   (listof-icecat-profile '())
   (list-of-icecat-profile '())
   "List of IceCat profiles.")

M gnu/home-services/xdg.scm => gnu/home-services/xdg.scm +1 -1
@@ 341,7 341,7 @@ The value of an XDG MIME entry must be a list, string or symbol, was given ~a")
  (actions xdg-desktop-entry-actions    ; list of <xdg-desktop-action>
           (default '())))

(define desktop-entries? (listof xdg-desktop-entry?))
(define desktop-entries? (list-of xdg-desktop-entry?))
(define (serialize-desktop-entries field-name val) "")

(define (serialize-xdg-desktop-entry entry)