Janek Warchoł <[email protected]> writes: > OMG, i can't believe i've sent such an unholy mess. Sorry - i got too > excited, apparently. > I meant something like this (unfortunately, this doesn't compile under > 2.17.13, saying that i have to be in Lyricmode for NoteHead - but at > least it makes some sense): > > foo = > #(define-music-function (parser location prop value music) > (symbol-list-or-symbol? scheme? music?) > (if (symbol? prop) > #{ \tweak #prop #value #music #} > #{ \once\override #prop = #value #})) > > { > \foo NoteHead.color #red > c'1-\foo #color #red -> > }
Ok, here is the deal: symbol-list-or-symbol? will _always_ convert something like xxx into a symbol list. The only time an actual symbol arrives is when you write #'xxx and that is for compatibility reasons. Why? Because it can't decide whether the argument is finished without looking for . and if we have lookahead anyway... At any rate: the error is slightly surprising to me but will likely disappear in 2.17.16. But since prop will always be a list, the second call will balk at seeing #color (color likely being undefined), and if it were #'color, the whole c'1-\foo #'color #red -> would be discarded as the ignored "music" of the first \foo call anyway. So I still have a hard time reading any sense into that proposal. -- David Kastrup _______________________________________________ lilypond-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/lilypond-devel
