lilypond-devel
[Top][All Lists]
Advanced

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

Re: parser variables persist beyond { } scope


From: Han-Wen Nienhuys
Subject: Re: parser variables persist beyond { } scope
Date: Fri, 31 Jul 2009 12:43:24 -0300

On Fri, Jul 31, 2009 at 3:39 AM, Mark Polesky<address@hidden> wrote:

>
> \score {
>  \relative {
>    <<
>    %% value of "afterGraceFraction" inherited from previous score.
>    { c1 \afterGrace d1 { c16[ d] } c1 }
>    #(define afterGraceFraction (cons 15 16))
>    { c1 \afterGrace d1 { c16[ d] } c1 }
>    >>
>  }
> }
> *********************
>
> Now maybe the only viable solution is to place the burden on the user
> to reset all parser variables manually after they're done with them
> in a particular block. But I very much dislike that solution because
> it multiplies the user's chances of making a mistake. And a lot of
> times, features with unintended consequences are hard to track down.
> Many, many things affect spacing, for example - so when I see spacing
> that looks wrong in the middle of a huge project, how can I possibly
> know where to look? And the realization that the cause of the problem
> could be in another score entirely... I really think this needs to be
> fixed.
>
> Does this make more sense?

No.  In the specific case, I'd recommend making another music function
that takes an argument, so you can pass the 15/16 explicitly, without
mucking with variables.
> - Mark
>
>
>
>
>



-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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