lilypond-user
[Top][All Lists]
Advanced

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

Re: helper function that should take a list argument doesn't do anything


From: David Kastrup
Subject: Re: helper function that should take a list argument doesn't do anything
Date: Fri, 09 Nov 2012 23:52:14 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

David Kastrup <address@hidden> writes:

> Actually, if you were using 2.17.6, you could just write
>
> staffdist =
> #(define-music-function (parser location distances)
>                         (list?)
>                         #{
>                           \overrideProperty
>                           Score.NonMusicalPaperColumn.
>                           line-break-system-details.alignment-distances
>                           #distances
>                         #})
>
> since it was easy enough extending \overrideProperty for dealing with
> subproperties that it would have been pointless not to support them.

Oh, and I'd use number-list? instead of just list? as a predicate.  The
more generic your predicate is, the stranger the results for bad uses of
the function will become.  If LilyPond sees that some predicate is
wrong, it pulls the plug on the whole function call and substitutes a
dummy value instead.  Usually much more straightforward than if a value
gets accepted and problems occur afterwards.

-- 
David Kastrup




reply via email to

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