From: David Kastrup Date: Thu, 20 Oct 2011 16:50:12 +0000 (+0200) Subject: music-function results should receive origin information. X-Git-Tag: release/2.15.15-1~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2ef5f65d8916349dc23afc89082485b58bc75cb0;p=lilypond.git music-function results should receive origin information. --- diff --git a/scm/ly-syntax-constructors.scm b/scm/ly-syntax-constructors.scm index 59eaee6d8e..c57917316b 100644 --- a/scm/ly-syntax-constructors.scm +++ b/scm/ly-syntax-constructors.scm @@ -46,7 +46,10 @@ (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")