logo       

Re: parser variables persist beyond { } scope: msg#00955

lilypond-devel-gnu

Subject: Re: parser variables persist beyond { } scope

On Fri, Jul 31, 2009 at 3:39 AM, Mark Polesky<markpolesky@xxxxxxxxx> 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 - hanwen@xxxxxxxxx - http://www.xs4all.nl/~hanwen


_______________________________________________
lilypond-devel mailing list
lilypond-devel@xxxxxxx
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Google Custom Search

News | Mail Home | sitemap | FAQ | advertise