> 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 #}) { c' % now it works! \context Staff \applyContext #(lambda (context) ;; access context properties and pick a property setting based on them... (ly:context-pushpop-property context 'StaffSymbol 'color red)) \stopStaff \startStaff c' % and you can put it in a music function \myfunc c' } > Though frankly I have no idea what \myFunc is trying to do. You are > keeping state in a global variable which is not going to work when using > \myFunc in several contexts in parallel. Um, never mind that, it was just my clumsy attempt to try to use \override Staff.StaffSymbol... to set the grob property when I couldn’t get ly:context-pushpop-property to work. Thanks again, I really appreciate your help. No telling how long or if I would have ever figured that out on my own. -Paul _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user