From b5ec3ec5062c32cf5c57e69c8bab92f79e48305d Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Mon, 24 Sep 2012 11:59:42 +0200 Subject: [PATCH] Issue 2856: Get along with use of grob-property instead of grob-property-path in overrides LilyPond uses a willy-nilly mixture of grob-property and grob-property-path when generating overrides programmatically (the parser only uses grob-property-path). Several override-reinterpreting commands and functionalities were not prepared to deal with this. --- ly/music-functions-init.ly | 10 ++++++++-- scm/lily-library.scm | 22 +++++++++++++++++----- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index e1dcd992e0..0fa79af3dd 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -1067,11 +1067,17 @@ a context modification duplicating their effect.") (cons* 'push (ly:music-property m 'symbol) (ly:music-property m 'grob-value) - (ly:music-property m 'grob-property-path))) + (cond + ((ly:music-property m 'grob-property #f) => list) + (else + (ly:music-property m 'grob-property-path))))) ((RevertProperty) (cons* 'pop (ly:music-property m 'symbol) - (ly:music-property m 'grob-property-path))))) + (cond + ((ly:music-property m 'grob-property #f) => list) + (else + (ly:music-property m 'grob-property-path))))))) (case (ly:music-property m 'name) ((ApplyContext) (ly:add-context-mod mods diff --git a/scm/lily-library.scm b/scm/lily-library.scm index ec1097a32b..854980012c 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -275,11 +275,17 @@ bookoutput function" (cons* 'push symbol (ly:music-property m 'grob-value) - (ly:music-property m 'grob-property-path))) - ((RevertProperty) + (cond + ((ly:music-property m 'grob-property #f) => list) + (else + (ly:music-property m 'grob-property-path))))) + ((RevertProperty) (cons* 'pop symbol - (ly:music-property m 'grob-property-path)))))) + (cond + ((ly:music-property m 'grob-property #f) => list) + (else + (ly:music-property m 'grob-property-path)))))))) (case (ly:music-property m 'name) ((ApplyContext) (ly:add-context-mod mods @@ -326,11 +332,17 @@ bookoutput function" (cons* 'push (ly:music-property m 'symbol) (ly:music-property m 'grob-value) - (ly:music-property m 'grob-property-path))) + (cond + ((ly:music-property m 'grob-property #f) => list) + (else + (ly:music-property m 'grob-property-path))))) ((RevertProperty) (cons* 'pop (ly:music-property m 'symbol) - (ly:music-property m 'grob-property-path))))) + (cond + ((ly:music-property m 'grob-property #f) => list) + (else + (ly:music-property m 'grob-property-path))))))) (case (ly:music-property m 'name) ((ApplyContext) (ly:add-context-mod mods -- 2.39.2