On Tue, 2009-08-04 at 14:01 -0700, Mark Polesky wrote:
> Mark Polesky wrote:
>
> > Otherwise, does this look good?
>
> I'm sorry to keep doing this, but I keep finding ways of
> improving this. Now I think users should find this very
> intuitive, although the internal workings are more complex.
>
> I've attached the most recent version, which includes an
> annotated example at the bottom, which explains the behind-
> the-scenes operations.
>
> Anyone want to have a look at it?
> Anyone have any comments/suggestions?
I'd like to second Neil's objection regarding the hard-coding of
GrandStaff/PianoStaff/StaffGroup as contexts containing
Span_arpeggio_engraver. Given the flexibility of contexts and engravers
in lilypond, it isn't a good idea to assume that certain contexts are
the only ones to provide a particular functionality.
Also, one other minor comment:
> #(define (find-spannable-context context)
> (let ((spannable-contexts '(GrandStaff PianoStaff StaffGroup)))
> (if (member (ly:context-name context) spannable-contexts)
> context
> (let ((parent (ly:context-parent context)))
> (if parent
> (let ((parent-name (ly:context-name parent)))
> (if (member parent-name spannable-contexts)
> parent
> (find-spannable-context parent)))
> #f)))))
you've written out the recursion twice: it should be
(let ((parent (ly:context-parent context)))
(if parent
(find-spannable-context parent)
#f))
Cheers,
Joe
>
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel