]> git.donarmstrong.com Git - lilypond.git/commitdiff
(addlyrics): set the 'origin property
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 30 May 2004 12:25:31 +0000 (12:25 +0000)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Sun, 30 May 2004 12:25:31 +0000 (12:25 +0000)
with the location argument in music function definitions.

ChangeLog
ly/music-functions-init.ly

index abd9c68e7c362583ee9df9f802a007d0f48fb186..4dba19523b158aa9e98ec32a76a9d083981ae83f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-05-30  Nicolas Sceaux  <nicolas.sceaux@free.fr>
+
+       * ly/music-functions-init.ly (addlyrics): set the 'origin property
+       with the location argument in music function definitions.
+
 2004-05-30  Han-Wen Nienhuys   <hanwen@xs4all.nl>
 
        * lily/paper-book.cc (split_string): new function
index 1d34fca85a2b0216a29c3428b59e379349a07a20..9ff677973e09733d356734702ab198a01ea65663 100644 (file)
@@ -14,27 +14,14 @@ applymusic = #(def-music-function (location func music) (procedure? ly:music?)
                (func music))
 
 addlyrics = #(def-music-function (location music lyrics) (ly:music? ly:music?)
-              (make-music 'LyricCombineMusic 'elements (list music lyrics)))
-
-#(use-modules (srfi srfi-1))
-#(define-public (symbol-or-symbols? obj)
-  "Return #t iif obj is a symbol or a symbol list."
-  (or (symbol? obj)
-      (and (list? obj)
-           (null? (remove symbol? obj)))))
-
-%{
-%% \mytag #'foo { ... } ==> OK
-%% c-\mytag #'foo ^4    ==> KO
-mytag = #(def-music-function (location tagname music) (symbol-or-symbols? ly:music?)
-        (set! (ly:music-property music 'tags)
-              ((if (list? tagname) append cons) tagname (ly:music-property music 'tags)))
-        music)
-%}
+              (make-music 'LyricCombineMusic 
+                          'origin location
+                          'elements (list music lyrics)))
 
 #(defmacro def-grace-function (start stop)
   `(def-music-function (location music) (ly:music?)
      (make-music 'GraceMusic
+       'origin location
        'element (make-music 'SequentialMusic
                   'elements (list (ly:music-deep-copy ,start)
                                   music
@@ -50,13 +37,35 @@ autochange = #(def-music-function (location music) (ly:music?)
                (make-autochange-music music))
 
 applycontext = #(def-music-function (location proc) (procedure?)
-                 (make-music 'ApplyContext 'procedure proc))
+                 (make-music 'ApplyContext 
+                   'origin location
+                   'procedure proc))
 
 applyoutput = #(def-music-function (location proc) (procedure?)
-                (make-music 'ApplyOutputEvent 'procedure proc))
+                (make-music 'ApplyOutputEvent 
+                  'origin location
+                  'procedure proc))
 
 breathe = #(def-music-function (location) ()
-            (make-music 'EventChord 'elements (list (make-music 'BreathingSignEvent))))
+            (make-music 'EventChord 
+              'origin location
+              'elements (list (make-music 'BreathingSignEvent))))
+
+%% \mytag #'foo { ... } ==> OK
+%% c-\mytag #'foo ^4    ==> KO
+%{
+#(use-modules (srfi srfi-1))
+#(define-public (symbol-or-symbols? obj)
+  "Return #t iif obj is a symbol or a symbol list."
+  (or (symbol? obj)
+      (and (list? obj)
+           (null? (remove symbol? obj)))))
+
+mytag = #(def-music-function (location tagname music) (symbol-or-symbols? ly:music?)
+        (set! (ly:music-property music 'tags)
+              ((if (list? tagname) append cons) tagname (ly:music-property music 'tags)))
+        music)
+%}
 
 %{