lilypond-devel
[Top][All Lists]
Advanced

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

Re: Add the command \offset to LilyPond (issue 8647044)


From: dak
Subject: Re: Add the command \offset to LilyPond (issue 8647044)
Date: Tue, 23 Apr 2013 22:09:04 +0000


https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm
File scm/music-functions.scm (right):

https://codereview.appspot.com/8647044/diff/5001/scm/music-functions.scm#newcode2103
scm/music-functions.scm:2103: ; head of the alist.  We reverse the alist
so our search will return
On 2013/04/23 20:24:57, dak wrote:
Why would tweak/override add to the _immutable_ properties?  How could
they?  Is
there something I don't understand here?

To answer myself: the basic properties would contain overrides (set
there from the respectively changed context property) but not tweaks
(which are applied after initialization of the grob).

"If our search returns an anonymous procedure" is quite strained.  We
don't need to _speculate_ about the identity of the anonymous procesure.
 If we want to be sure, we can just remember it:

(define (offsetter property offsets)
  (define (self grob)
     ...

and we can now check through both mutable and immutable grob properties,
find self, and look behind self in the aliast to see whether we find
another occurence of the property which, if found, we duly evaluate
recursively.  That should allow multiple offsetter calls to work
recursively.

Huh.  Maybe not the best idea since
\offset Y-offset ... Grob
\offset Y-offset ... Grob
would not accumulate while
\offset Y-offset ... Grob
\temporary\offset Y-offset ... Grob
or even
\offset Y-offset ... Grob
\once\offset Y-offset ... Grob
would.

But still seems better than forgetting all overrides except the first
one (likely in the grob definition).

https://codereview.appspot.com/8647044/



reply via email to

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