X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fmusic-functions-init.ly;h=129f6a3ade08d91a79ecfc446d1ffd13dee96e0c;hb=37ca1f80bf5401accd17056938f4f7b2c147ddb2;hp=95b5cc5cc87eb25ae32d07079b7a9c76a6a2cd92;hpb=ac6c83f047635535d0481a15654c13e776334dc6;p=lilypond.git diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 95b5cc5cc8..129f6a3ade 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -157,7 +157,7 @@ clef = (make-clef-set type)) -compressMusic = +scaleDurations = #(define-music-function (parser location fraction music) (number-pair? ly:music?) (ly:music-compress music (ly:make-moment (car fraction) (cdr fraction)))) @@ -476,7 +476,16 @@ parenthesize = #(define-music-function (parser loc arg) (ly:music?) (_i "Tag @var{arg} to be parenthesized.") - (set! (ly:music-property arg 'parenthesize) #t) + (if (memq 'event-chord (ly:music-property arg 'types)) + ; arg is an EventChord -> set the parenthesize property on all child notes and rests + (map + (lambda (ev) + (if (or (memq 'note-event (ly:music-property ev 'types)) + (memq 'rest-event (ly:music-property ev 'types))) + (set! (ly:music-property ev 'parenthesize) #t))) + (ly:music-property arg 'elements)) + ; No chord, simply set property for this expression: + (set! (ly:music-property arg 'parenthesize) #t)) arg) %% for lambda*