From 2ef5f65d8916349dc23afc89082485b58bc75cb0 Mon Sep 17 00:00:00 2001 From: David Kastrup <dak@gnu.org> Date: Thu, 20 Oct 2011 18:50:12 +0200 Subject: [PATCH] music-function results should receive origin information. --- scm/ly-syntax-constructors.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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") -- 2.39.5