]> git.donarmstrong.com Git - lilypond.git/commitdiff
music-function results should receive origin information.
authorDavid Kastrup <dak@gnu.org>
Thu, 20 Oct 2011 16:50:12 +0000 (18:50 +0200)
committerDavid Kastrup <dak@gnu.org>
Thu, 20 Oct 2011 16:51:09 +0000 (18:51 +0200)
scm/ly-syntax-constructors.scm

index 59eaee6d8ecbc927b996580761028943b837b77b..c57917316b8f6950401062a58f4ac5099abed73b 100644 (file)
 (define-ly-syntax (music-function parser loc pred default fun args)
   (let ((m (apply fun parser loc args)))
     (if (pred m)
-       m
+       (begin
+         (if (ly:music? m)
+             (set! (ly:music-property m 'origin) loc))
+         m)
        (begin
          (ly:parser-error parser
                           (format #f (_ "~a function cannot return ~a")