"Phil Holmes" <m...@philholmes.net> writes:

>>> Question is - is it OK to modify my code to use statics,
>>
>> No.  Even engravers at score level are running in parallel, like when
>> using a \score markup or using the part combiner or quoting music and so
>> on.  Static variables just don't work in this setting.
>
> I'm sure that's not a problem here - the instrument name engraver
> finishes its work before the output-def indent code is called at all,
> so the name engraver "corrects" the indent before it's ever used.

If every name itself is a score, you'll trash your global variables
before all names have been typeset.

And if you think this is purely hypothetical, check out
Documentation/snippets/incipit.ly.

There are exceptions to every rule.  But if you are calling for an
exception because you lack the skills for following the rule, it is
unlikely that your skills are sufficient for correctly identifying the
exception.

-- 
David Kastrup

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to