]> git.donarmstrong.com Git - lilypond.git/commitdiff
Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol?
authorDavid Kastrup <dak@gnu.org>
Tue, 9 Oct 2012 11:26:52 +0000 (13:26 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 25 Oct 2012 18:29:27 +0000 (20:29 +0200)
list-or-symbol? was previously used in the meaning of
symbol-list-or-symbol? only, and there is no point in not checking the
list members for actually being symbols, in order to avoid ugly
surprises later.

ly/music-functions-init.ly
ly/property-init.ly
scm/c++.scm
scm/lily.scm

index 1fcdeedce764555089faafeeb23b108e4a9409e1..f41fc6e7a007db21d28e355269a6685962b77d16 100644 (file)
@@ -1227,7 +1227,7 @@ the `parameters' assoc list.")
 
 styledNoteHeads =
 #(define-music-function (parser location style heads music)
-   (symbol? list-or-symbol? ly:music?)
+   (symbol? symbol-list-or-symbol? ly:music?)
    (_i "Set @var{heads} in @var{music} to @var{style}.")
    (style-note-heads heads style music))
 
index fd9c2f337a33eea93fef7ee57994dfd9cfd47ed8..d88559d26408374a702ff9981e9110d63fda53e1 100644 (file)
@@ -382,7 +382,7 @@ back to the lilypond source statement.")
    (make-music 'SequentialMusic 'void #t))
 
 pointAndClickTypes =
-#(define-void-function (parser location types) (list-or-symbol?)
+#(define-void-function (parser location types) (symbol-list-or-symbol?)
   (_i "Set a type or list of types (such as @code{#'note-event}) for which point-and-click info is generated.")
   (ly:set-option 'point-and-click types))
 
index 12c38a397f0ac7d4b297c6c3c2dbb463cfc25124..8d1df2aed7487b22c742780e4f73c0c12833fbd2 100644 (file)
 (define-public (cheap-list? x)
   (or (pair? x) (null? x)))
 
-(define-public (list-or-symbol? x)
-  (or (cheap-list? x) (symbol? x)))
+(define-public (symbol-list-or-symbol? x)
+  (if (list? x)
+      (every symbol? x)
+      (symbol? x)))
 
 (define-public (scheme? x) #t)
 
index 1cc2a438ea1e0885a7cde275d1ca9e27b9984e6b..1a5674df570336ae6ff30516bd4bbb979d30ca59 100644 (file)
@@ -568,8 +568,6 @@ messages into errors.")
     (,fraction? . "fraction, as pair")
     (,grob-list? . "list of grobs")
     (,index? . "non-negative integer")
-    ;; this is built on cheap-list
-    (,list-or-symbol? . "list or symbol")
     (,markup? . "markup")
     (,markup-command-list? . "markup command list")
     (,markup-list? . "markup list")
@@ -586,6 +584,7 @@ messages into errors.")
     (,string-or-symbol? . "string or symbol")
     (,symbol-list? . "symbol list")
     (,symbol-list-or-music? . "symbol list or music")
+    (,symbol-list-or-symbol? . "symbol list or symbol")
     (,void? . "void")
     ))