From 8e6e143b579bd2bc5b748a8be43efc5fd9120d7a Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 24 Nov 2012 21:04:54 +0100 Subject: [PATCH] Issue 2997/3: Let \single deal with nested property overrides --- ly/music-functions-init.ly | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index bf06d40722..f321083218 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -1177,8 +1177,7 @@ single = #(define-music-function (parser location overrides music) (ly:music? ly:music?) (_i "Convert @var{overrides} to tweaks and apply them to @var{music}. -This does not convert @code{\\revert}, @code{\\set} or @code{\\unset} -and ignores nested overrides.") +This does not convert @code{\\revert}, @code{\\set} or @code{\\unset}.") (set! (ly:music-property music 'tweaks) (fold-some-music (lambda (m) (eq? (ly:music-property m 'name) @@ -1188,12 +1187,12 @@ and ignores nested overrides.") ((ly:music-property m 'grob-property #f) => list) (else (ly:music-property m 'grob-property-path))))) - (if (pair? (cdr p)) - tweaks ;ignore nested properties - (acons (cons (ly:music-property m 'symbol) ;grob name - (car p)) ;grob property - (ly:music-property m 'grob-value) - tweaks)))) + (acons (cons (ly:music-property m 'symbol) ;grob name + (if (pair? (cdr p)) + p ;grob property path + (car p))) ;grob property + (ly:music-property m 'grob-value) + tweaks))) (ly:music-property music 'tweaks) overrides)) music) -- 2.39.2