Hi all,
I have a hard time understanding the integration between LilyPond and
Scheme (still ...).
I'm trying to create a function that defines a function:
\version "2.19.16"
origBreak = {}
#(define keepOriginalBreaks
(define origBreak (define-music-function (parser location)()
#{ \break #})))
%\keepOriginalBreaks
\relative c' {
c c c c
\origBreak
\repeat unfold 128 c
}
As far as I understand it this snippet should do the following:
- create an empty command origBreak (so it can be used in the music
expression)
- define a function keepOriginalBreaks that - when executed - redefines
origBreak to produce a \break
In the form shown above the \origBreak command in the music expression
should then have no effect.
But actually it *does* issue a \break, and even if I comment out the
initial definition of origBreak the file compiles - with the break after
the first measure.
So obviously the "(define origBreak ...)" expression gets evaluated even
when \keepOriginalBreaks is not called.
Could someone explain to me what is happening here?
TIA
Urs
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user