[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/16] Replace the rather fuzzy list-or-symbol? with symbol-list-
From: |
David Kastrup |
Subject: |
[PATCH 11/16] Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol? |
Date: |
Tue, 9 Oct 2012 20:59:56 +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 | 2 +-
ly/property-init.ly | 2 +-
scm/c++.scm | 6 ++++--
scm/lily.scm | 3 +--
4 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly
index 2180b89..3c60565 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 caf6ad0..3a88098 100644
--- a/ly/property-init.ly
+++ b/ly/property-init.ly
@@ -365,7 +365,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 12c38a3..8d1df2a 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 268fd1c..4263ab4 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -562,8 +562,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")
@@ -580,6 +578,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")
))
--
1.7.9.5
- Context.Grob considered as symbol list, David Kastrup, 2012/10/09
- [PATCH 08/16] Allow property and grob paths to be constructed from strings, David Kastrup, 2012/10/09
- [PATCH 07/16] Add symbol-list? predicate, David Kastrup, 2012/10/09
- [PATCH 05/16] Let \accidentalStyle detect its optional context argument by looking at its letter case, David Kastrup, 2012/10/09
- [PATCH 11/16] Replace the rather fuzzy list-or-symbol? with symbol-list-or-symbol?,
David Kastrup <=
- [PATCH 13/16] Change \accidentalStyle to get a symbol list as argument, David Kastrup, 2012/10/09
- [PATCH 03/16] parser.yy: make is_regular_identifier match the lexer definition, David Kastrup, 2012/10/09
- [PATCH 14/16] convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty, David Kastrup, 2012/10/09
- [PATCH 01/16] Assignments can't contain literal lyric music (wrong lexer mode), David Kastrup, 2012/10/09
- [PATCH 04/16] Factor SCM_IDENTIFIER out from embedded_scm_arg*, David Kastrup, 2012/10/09
- [PATCH 02/16] parser.yy: FRACTION does not require a closed expression before it, David Kastrup, 2012/10/09
- [PATCH 16/16] Let \overrideProperty accept nested properties, David Kastrup, 2012/10/09
- [PATCH 12/16] Make \alterBroken, \hide, \omit, \overrideProperty, \shape take unquoted Context.Grob specs, David Kastrup, 2012/10/09
- [PATCH 09/16] Allow the string "xxx.yyy" to parse as a symbol list, David Kastrup, 2012/10/09
- [PATCH 06/16] Allow LilyPond strings to stand in for symbols when parsing, David Kastrup, 2012/10/09