Paul Morris <p...@paulwmorris.com> writes: >> On Oct 19, 2015, at 1:56 AM, David Kastrup <d...@gnu.org> wrote: >> >> I think your main problem is that you are using \applyContext here at >> Voice level where it does not really do anything worthwhile. > > Ah, I see. > >> Try \context Staff \applyContext … > > That did the trick and now it works, thanks! > > \version “2.19.22” > > myfunc = > #(define-music-function () () > #{ > \context Staff > \applyContext > #(lambda (context) > ;; access context properties and pick a property setting based on > them... > (ly:context-pushpop-property context 'StaffSymbol 'color green)) > \stopStaff > \startStaff > #})
Frankly, anything wrong with \temporary \override Staff.StaffSymbol.color = #green here? Assuming you want a temporary override (which is what ly:context-pushpop-property does) in order to be able to revert to the previous setting afterwards. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user