From: David Kastrup Date: Tue, 9 Oct 2012 11:26:52 +0000 (+0200) Subject: Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol? X-Git-Tag: release/2.17.6-1~27 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;ds=sidebyside;h=07328e4a7271fb2553823c42fbe60a8c6613cafa;p=lilypond.git Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol? 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. --- diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 1fcdeedce7..f41fc6e7a0 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -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)) diff --git a/ly/property-init.ly b/ly/property-init.ly index fd9c2f337a..d88559d264 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -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)) diff --git a/scm/c++.scm b/scm/c++.scm index 12c38a397f..8d1df2aed7 100644 --- a/scm/c++.scm +++ b/scm/c++.scm @@ -74,8 +74,10 @@ (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) diff --git a/scm/lily.scm b/scm/lily.scm index 1cc2a438ea..1a5674df57 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -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") ))