Thank you all for your help on this.

My original question, "how does Lilypond recognize the end of the
definition of a variable" has been answered: the definition has to be a
single, complete expression.

Which of course produces another question: "what is classed as a single
expression?"

Well, I think I understand what a music expression is.  A single music
expression is any music (possibly including sub-expressions) enclosed
between { }, and optionally preceded by \new <context>.

Oh yes, and it can also be preceded by \relative.

And perhaps one or two other things.  Or maybe not.

Non-music expressions are varied: a quoted string is, not surprisingly,
a single expression.  \paper { ... } is one expression.  4.5\cm is
equivalent to a particular Scheme expression. (!)

And, as pointed out, this is far from a complete list.

No wonder I was, and to some extent am, confused!

But I do have a clearer idea now of what can and cannot be used in a
variable.  The form is not quite as flexible as I had hoped, but it may
well be that it makes better sense for a variable to represent a
complete expression rather than any arbitrary chunk of the same file
without variables.

David


_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to