]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/regression/apply-context.ly
Merge with master
[lilypond.git] / input / regression / apply-context.ly
index 1a0feef3278a4decb1a5db82999016ecb77b2ecc..abcbd3028165077e2555452d23d8ce2ade465238 100644 (file)
@@ -1,9 +1,10 @@
-\version "1.7.23"
+
+\version "2.10.0"
 
 
 \header {
 
-texidoc = "With \\applycontext, \\properties can be modified
+texidoc = "With @code{\\applyContext}, @code{\\properties} can be modified
 procedurally. Applications include: checking bar numbers, smart
 octavation.
 
@@ -13,17 +14,17 @@ This example prints a bar-number during processing on stdout.
 
 }
 
-    \paper { raggedright= ##t }
+\layout { ragged-right= ##t }
 
 
-\score { \notes \relative c'' {
-    c1 c1
+\relative c'' {
+  c1 c1
 
-    %% todo: should put something interesting in the .tex output.
-    
-    \applycontext
-       #(lambda (tr)
-        (format #t "\nWe were called in barnumber ~a.\n"
-         (ly:get-context-property tr 'currentBarNumber)))
-    c1 c1
-}}
+  %% todo: should put something interesting in the .tex output.
+  
+  \applyContext
+  #(lambda (tr)
+    (ly:progress "\nWe were called in bar number ~a.\n"
+     (ly:context-property tr 'currentBarNumber)))
+  c1 c1
+}