On Tue, Jul 8, 2014 at 5:39 AM, Simon Albrecht <simon.albre...@mail.de> wrote:
Hello everybody,

I just wrote a music function to mark grobs as editorial addition by colouring them grey. See the code and an example:

\version "2.19.8"

ed = #(let
((string-or-list?
(lambda (grob)
(or (string? grob)
(list? grob)))))
(define-music-function
(parser location grob mus)
(string-or-list? ly:music?)
#{ \override $grob . color = #(x11-color 'grey40)
$mus
\revert $grob . color #}
)
)

\relative { \ed NoteHead c' \ed #'(Staff Accidental) { cis dis } es }

%%%%%%%%%%%%%

The 2.18 changes document says that #'(Staff Accidental) and Staff.Accidental were now interchangeable, however if I replace it in the second function call, I get errors (unexpected "." etc.). Is there a way to avoid this in the coding of the function or should it be considered a bug?

Best regards,
Simon



Simon,

You should be able to use the older syntax for indicating grob properties:

        \override $grob #'color = #(x11-color 'grey40)
        $mus
        \revert $grob #'color

See if that helps.

-Abraham


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to