diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 95b5cc5..f50b8c8 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -475,8 +475,15 @@ pitchedTrill = 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 EventChor -> set the parenthesize property on all child elements + (let* ((elm (ly:music-property arg 'elements))) + ; (if (> (length elm) 1) (display "more than 1 element..\n" )) + (map (lambda (x) (set! (ly:music-property x 'parenthesize) #t)) elm) + ) + ; No chord, simply set property for this expression: + (set! (ly:music-property arg 'parenthesize) #t) + ) arg) %% for lambda*