lilypond-devel
[Top][All Lists]
Advanced

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

Re: Determining location of the staff lines


From: David Kastrup
Subject: Re: Determining location of the staff lines
Date: Thu, 18 Feb 2010 14:35:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

Han-Wen Nienhuys <address@hidden> writes:

> On Thu, Feb 18, 2010 at 8:54 AM, David Kastrup <address@hidden> wrote:
>
>>> I think it's not yet possible to do this in a Scheme engraver.
>>>
>>> Han-Wen indicated that it could be done here:
>>>
>>> http://lists.gnu.org/archive/html/lilypond-devel/2010-01/msg00594.html
>>>
>>> But I don't think it's been implemented yet.  Perhaps Han-Wen will do so,
>>> now that we've identified a need.
>>
>> Here is one possibility to do this in a somewhat sane manner: permit the
>> initialize function to return an alist that can replace elements in the
>> Scheme engraver alist.
>
> This would become a mess if there were two scheme engravers doing the
> same thing.

The replacement would of course be done per-instantiation, not globally.

>> Then you can use let and closures inside of the initialize function
>> in order to declare variables local to the functions of one engraver
>> instance.
>
> I think the local variables will be bound to the wrong thing, and if
> two instances of the Scheme engraver do this, they will share their
> local variables, with interesting effects.

No, they won't share their local variables since both instances had
their own call of the initialization function, and consequently their
own closures with their own local variables from the let inside of the
initialization function.

-- 
David Kastrup




reply via email to

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