X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ly%2Fmusic-functions-init.ly;h=4ee2e4dcaf5c7d942bcc74d83fb67d3d25d1d4f7;hb=f1baa2d2047dfc44ae7b339cbd64dafc5aebf5ef;hp=9544346db3f690a06a1a1ece67b3f4f244f3f908;hpb=952705bbbb000581a13836e6a733df04511e93c5;p=lilypond.git diff --git a/ly/music-functions-init.ly b/ly/music-functions-init.ly index 9544346db3..4ee2e4dcaf 100644 --- a/ly/music-functions-init.ly +++ b/ly/music-functions-init.ly @@ -335,27 +335,22 @@ endSpanners = #(define-music-function (parser location music) (ly:music?) (_i "Terminate the next spanner prematurely after exactly one note without the need of a specific end spanner.") - (if (memq (ly:music-property music 'name) '(EventChord NoteEvent)) - (let* ((start-span-evs (filter (lambda (ev) - (equal? (ly:music-property ev 'span-direction) - START)) - (extract-typed-music music 'span-event))) - (stop-span-evs - (map (lambda (m) - (let ((c (music-clone m))) - (set! (ly:music-property c 'span-direction) STOP) - c)) - start-span-evs)) - (end-ev-chord (make-music 'EventChord - 'elements stop-span-evs)) - (total (make-music 'SequentialMusic - 'elements (list music - end-ev-chord)))) - total) - - (begin - (ly:input-message location (_ "argument endSpanners is not an EventChord: ~a") music) - music))) + (let* ((start-span-evs (filter (lambda (ev) + (equal? (ly:music-property ev 'span-direction) + START)) + (extract-typed-music music 'span-event))) + (stop-span-evs + (map (lambda (m) + (let ((c (music-clone m))) + (set! (ly:music-property c 'span-direction) STOP) + c)) + start-span-evs)) + (end-ev-chord (make-music 'EventChord + 'elements stop-span-evs)) + (total (make-music 'SequentialMusic + 'elements (list music + end-ev-chord)))) + total)) eventChords = #(define-music-function (parser location music) (ly:music?)