lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Add function for overriding broken spanners to LilyPond. (issue 6397


From: David Kastrup
Subject: Re: Add function for overriding broken spanners to LilyPond. (issue 6397054)
Date: Fri, 20 Jul 2012 14:42:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

David Nalesnik <address@hidden> writes:

>     An optional argument can be skipped only if there is some place in
>     the argument list where it can go.  So in final position, optional
>     arguments are indistinguishable from mandatory arguments (actually
>     not quite, since they make preceding optional arguments also
>     mandatory).  You can, however, still explicitly skip them by
>     writing \default in the actual argument list, like commands like
>     \key and \mark let you do.
>     
>
> Ah, OK!  So (for the record) writing
>
> \test #'color #blue \default
>
> works perfectly with the test function.  And
>
> \test #'color #@(list green red)
>
> does too.

This use of \default for skipping optional arguments even in end
position may appear a bit contrived.

However, \key \default and \mark \default existed (hardwired in the
parser) even before music functions ever heard of optional arguments, so
I consider it an accomplishment to have made this preexisting syntax fit
into a coherent whole.

-- 
David Kastrup




reply via email to

[Prev in Thread] Current Thread [Next in Thread]