[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/16] Add symbol-list-or-music? predicate
From: |
David Kastrup |
Subject: |
[PATCH 10/16] Add symbol-list-or-music? predicate |
Date: |
Tue, 9 Oct 2012 20:59:55 +0200 |
This is of interest for commands like \hide which accept either music
(to see an override) or a grob specification like Accidental or
Voice.Accidental.
---
scm/c++.scm | 5 +++++
scm/lily.scm | 1 +
2 files changed, 6 insertions(+)
diff --git a/scm/c++.scm b/scm/c++.scm
index d627481..12c38a3 100644
--- a/scm/c++.scm
+++ b/scm/c++.scm
@@ -51,6 +51,11 @@
(define-public (symbol-list? x)
(and (list? x) (every symbol? x)))
+(define-public (symbol-list-or-music? x)
+ (if (list? x)
+ (every symbol? x)
+ (ly:music? x)))
+
(define-public (string-or-symbol? x)
(or (string? x) (symbol? x)))
diff --git a/scm/lily.scm b/scm/lily.scm
index a74d6af..268fd1c 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -579,6 +579,7 @@ messages into errors.")
(,string-or-music? . "string or music")
(,string-or-symbol? . "string or symbol")
(,symbol-list? . "symbol list")
+ (,symbol-list-or-music? . "symbol list or music")
(,void? . "void")
))
--
1.7.9.5
- [PATCH 03/16] parser.yy: make is_regular_identifier match the lexer definition, (continued)
- [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
- [PATCH 15/16] Run scripts/auxiliar/update-with-convert-ly.sh, David Kastrup, 2012/10/09
- [PATCH 10/16] Add symbol-list-or-music? predicate,
David Kastrup <=
- Re: Context.Grob considered as symbol list, Colin Campbell, 2012/10/09
- Re: Context.Grob considered as symbol list, David Kastrup, 2012/10/10
- Re: Context.Grob considered as symbol list, David Kastrup, 2012/10/10
- Re: Context.Grob considered as symbol list, Werner LEMBERG, 2012/10/10
- Re: Context.Grob considered as symbol list, David Kastrup, 2012/10/10
- Re: Context.Grob considered as symbol list, Werner LEMBERG, 2012/10/10
- Re: Context.Grob considered as symbol list, David Kastrup, 2012/10/10
- Re: Context.Grob considered as symbol list, Werner LEMBERG, 2012/10/10
- Re: Context.Grob considered as symbol list, David Kastrup, 2012/10/10
- Re: Context.Grob considered as symbol list, Werner LEMBERG, 2012/10/10