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:47:57 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux)

Janek Warchoł <address@hidden> writes:

> On Thu, Nov 8, 2012 at 9:21 AM, David Kastrup <address@hidden> wrote:
>
>> Then you are writing a quoted list here.  Inside of a quoted list, _all_
>> symbols are quoted, not referenced for their value.  So you need either
>> to use proper evaluated Scheme here, like
>> #(list (cons 'alignment-distances distances))
>
> indeed, this works:
>
> staffdist =
> #(define-music-function (parser location distances)
>                         (list?)
>                         #{
>                           \overrideProperty #"Score.NonMusicalPaperColumn"
>                           #'line-break-system-details
>                           #(list (cons 'alignment-distances distances))
>                         #})
>
> thank you!

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.

-- 
David Kastrup




reply via email to

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