On 2014/02/18 18:09:08, janek wrote:
> I think that turning \coloredNotes into a context definition
producer by
> just removing the \layout { and matching } without any other change > would work fine and make a nice example.
You mean something like this?
coloredNotes = #(define-scheme-function (parser location col)(color?) #{ \layout { \context { \Staff \override NoteHead #'color = #col } } #})
\coloredNotes #blue
{ c' }
This example doesn't compile for me, i get "error: bad expression type" (using 82bc9ad690, pretty close to current master)
It would help to read the whole description from beginning to end. It's just one sentence, so I did not expect it to be easy to misinterpret it by wildly applying the second half to some place where it has nothing to do with the first part of the sentence. coloredNotes = #(define-scheme-function (parser location col)(color?) #{ \context { \Staff \override NoteHead #'color = #col } #}) \layout { \coloredNotes #blue } { c' } And now also \layout { indent = 0 \coloredNotes #blue } will work. https://codereview.appspot.com/60490050/ _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel