On 16 November 2010 04:34, Andrew C. Smith
<[email protected]> wrote:
> As far as I can see, this is just a normal text-replacement function. I
> googled around though, and can't find much related to string_identifier aside
> from a printout of the entire bison grammar specification for Lilypond, which
> wasn't too helpful. How do I turn a string_identifier into a string?
This is a string identifier:
foo = #"bar"
The \change command expects bare strings for arguments, so the following,
\change Staff = \foo
isn't allowed.
You'll have to use the internal scheme representation of \change to
pass arbitrary strings as the context id:
\displayMusic \change Staff = sTwo
->
(make-music
'ContextChange
'change-to-id
"sTwo"
'change-to-type
'Staff)
follower =
#(define-music-function (parser location switch) (string?)
(make-sequential-music
(list
#{
\once \override VoiceFollower #'style = #'dashed-line
#}
(make-music
'ContextChange
'change-to-id switch
'change-to-type 'Staff))))
Cheers,
Neil
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user