X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fmusic-functions.scm;h=d714deec8c886123abff1072a46916580d0ffd4c;hb=42cb7d446827dce32a42b5b243bda522518b3d46;hp=c07a935fe4512cf3cef5061bbc84b3b4132e2112;hpb=cc2b7846eacc4901a8bfffa46788f6fff0415c2f;p=lilypond.git diff --git a/scm/music-functions.scm b/scm/music-functions.scm index c07a935fe4..d714deec8c 100644 --- a/scm/music-functions.scm +++ b/scm/music-functions.scm @@ -915,12 +915,12 @@ actually fully cloned." (define-public (add-grace-property context-name grob sym val) "Set @var{sym}=@var{val} for @var{grob} in @var{context-name}." (define (set-prop context) - (let* ((where (ly:context-property-where-defined context 'graceSettings)) + (let* ((where (or (ly:context-find context context-name) context)) (current (ly:context-property where 'graceSettings)) (new-settings (append current (list (list context-name grob sym val))))) (ly:context-set-property! where 'graceSettings new-settings))) - (context-spec-music (make-apply-context set-prop) 'Voice)) + (make-apply-context set-prop)) (define-public (remove-grace-property context-name grob sym) "Remove all @var{sym} for @var{grob} in @var{context-name}." @@ -929,7 +929,7 @@ actually fully cloned." (eq? (cadr property) grob) (eq? (caddr property) sym))) (define (delete-prop context) - (let* ((where (ly:context-property-where-defined context 'graceSettings)) + (let* ((where (or (ly:context-find context context-name) context)) (current (ly:context-property where 'graceSettings)) (prop-settings (filter (lambda(x) (sym-grob-context? x sym grob context-name)) @@ -939,8 +939,7 @@ actually fully cloned." (set! new-settings (delete x new-settings))) prop-settings) (ly:context-set-property! where 'graceSettings new-settings))) - (context-spec-music (make-apply-context delete-prop) 'Voice)) - + (make-apply-context delete-prop)) (defmacro-public def-grace-function (start stop . docstring)