]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/add-staccato.ly
* lily/note-spacing.cc (get_spacing): less space at EOL in case of
[lilypond.git] / input / test / add-staccato.ly
index 996196b5110388ae3ebf97aa4ec57a20cc4066fa..fb3a4b8a5cb9f2be6570090ec1645318d53116ca 100644 (file)
@@ -1,5 +1,6 @@
-\version "1.7.18"  %% or actually: 1.7.1 ...
-% FIXME: doesn't work with 1.7.19.  Check with more recent version.
+
+\version "2.1.25"
+
 \header {
 
 texidoc= "@cindex Add Stacato
@@ -15,16 +16,11 @@ one would not use scm constructs.  See separate-staccato.ly first.
      m))
     
 #(define (add-script m x)
-   (if (equal? (ly:get-mus-property m 'name) 'RequestChord)
-       (ly:set-mus-property! m 'elements
-                           (cons (make-script x)
-                                 (ly:get-mus-property m 'elements)))
-
-       (let ((es (ly:get-mus-property m 'elements))
-            (e (ly:get-mus-property m 'element)) )
-        (map (lambda (y) (add-script y x)) es)
-        (if (ly:music? e)
-            (add-script e x))))
+   (if
+    (equal? (ly:get-mus-property m 'name) 'EventChord)
+    (ly:set-mus-property! m 'elements
+                         (cons (make-script x)
+                               (ly:get-mus-property m 'elements))))
    m)
 
 #(define (add-staccato m)
@@ -32,10 +28,9 @@ one would not use scm constructs.  See separate-staccato.ly first.
 
 \score {
   \notes\relative c'' {
-    a b \apply #add-staccato { c c } 
-    a b \apply #add-staccato { c c } 
+    a b \apply #(lambda (x) (music-map add-staccato x)) { c c } 
   }
-       \paper{ raggedright = ##t }
+  \paper{ raggedright = ##t }
 }