]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/lily-in-scheme.ly
Issue 4422/5: Run scripts/auxiliar/update-with-convert-ly.sh
[lilypond.git] / input / regression / lily-in-scheme.ly
index 344fc69e79649ef8f3e119619873bc47a3978f77..fdf6da5ee2e455313d4c4d9fac6dd63713cb5b7c 100644 (file)
@@ -4,49 +4,41 @@
     them with a @code{$}, both in a LilyPond context or in a Scheme
     context.
 
-In this example, the @code{\withpaddingA}, @code{\withpaddingB} and
-@code{\withpaddingC} music functions set different kinds of padding on
+In this example, the @code{\\withpaddingA}, @code{\\withpaddingB} and
+@code{\\withpaddingC} music functions set different kinds of padding on
 the @code{TextScript} grob.
 
-FIXME: this is broken.
 "
-    
-}
+          
+      }
 
+\version "2.19.22"
+\layout { ragged-right = ##t }
 
-\score{ c'4^"FIXME" }
-%{
+withPaddingA = #(define-music-function (padding music) (number? ly:music?)
+                #{ \override TextScript.padding = #padding
+                $music 
+                \revert TextScript.padding #})
 
-\version "2.3.4"
-\paper { raggedright = ##t }
+withPaddingB = #(define-music-function (padding music) (number? ly:music?)
+                #{ \override TextScript.padding = #(* padding 2)
+                $music 
+                \revert TextScript.padding #})
 
-withPaddingA = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #$padding
-                      $music 
-                      \revert TextScript #'padding #})
-  
-withPaddingB = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #$(* padding 2)
-                      $music 
-                      \revert TextScript #'padding #})
-  
-withPaddingC = #(def-music-function (location padding music) (number? ly:music?)
-                   #{ \override TextScript #'padding = #(+ 1 $(* padding 2))
-                      $music 
-                      \revert TextScript #'padding #})
-  
-  \score {
-      \notes {
-          c'^"1"
-          \withPaddingA #2
-            { c'^"2" c'^"3"}
-          c'^"4"
-          \withPaddingB #2
-            { c'^"5" c'^"6"}
-          c'^"7"
-          \withPaddingC #2
-            { c'^"8" c'^"9"}
-          c'^"10"
-      }
-  }
-%}
+withPaddingC = #(define-music-function (padding music) (number? ly:music?)
+                #{ \override TextScript.padding = #(+ 1 (* padding 2))
+                   $music 
+                   \revert TextScript.padding #})
+
+{
+    c'^"1"
+    \withPaddingA #2
+    { c'^"2" c'^"3"}
+    c'^"4"
+    \withPaddingB #2
+    { c'^"5" c'^"6"}
+    c'^"7"
+    \withPaddingC #2
+    { c'^"8" c'^"9"}
+    c'^"10"
+}