]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 2744: Remove music typecheck in \endSpanners
authorDavid Kastrup <dak@gnu.org>
Tue, 14 Aug 2012 05:58:09 +0000 (07:58 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 17 Aug 2012 05:22:43 +0000 (07:22 +0200)
ly/music-functions-init.ly

index 9544346db3f690a06a1a1ece67b3f4f244f3f908..4ee2e4dcaf5c7d942bcc74d83fb67d3d25d1d4f7 100644 (file)
@@ -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?)