"Trevor Daniels" <t.dani...@treda.co.uk> writes:

> David, you wrote  Monday, June 05, 2017 5:34 PM
>
>
>> Richard Shann <rich...@rshann.plus.com> writes:
>> 
>>> I found by trial-and-error that if I remove any of the three occurrences
>>> of the ly:expect-warning the warning returns.
>>>
>>> Where should it be called?
>> 
>> At the top, once for every expected warning.  It doesn't make sense
>> placing it in music expressions: its effect will be immediate anyway and
>> it does not become part of the music.
>
> Why does it not make sense to place it in a music expression?  I find
> keeping the suppression adjacent to the place the warning is triggered
> helps to remind me why it is there.

Music expressions can be invoked any number of times (including zero)
and in arbitrary order.  Putting ly:expect-warning inside of a music
expression suggests that trigger and suppression of the warning are
linked.  However, the trigger of the warning occurs when the music
expression is actually interpreted (and even then, it might be triggered
by different phases of interpretation) while the suppression is
registered at the moment ly:expect-warning is read from the input file.

-- 
David Kastrup

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

Reply via email to