]> git.donarmstrong.com Git - lilypond.git/blob - input/regression/markup-cyclic-reference.ly
f4495db1ce40c8a42a59b060010f51b3bcebeb43
[lilypond.git] / input / regression / markup-cyclic-reference.ly
1 \version "2.15.11"
2 #(ly:set-option 'warning-as-error #f)
3
4 \header {
5   texidoc = "Cyclic markup definitions should cause a warning, but
6 not crash LilyPond with an endless loop"
7 }
8
9 % A simple markup function that calls itself in a loop.
10 #(define-markup-command (cycle layout props m)
11   (markup?)
12   (interpret-markup layout props (make-cycle-markup m)))
13
14 % Two simple markup functions that call each other in a loop.
15 #(define-markup-command (cycleI layout props m)
16   (markup?)
17   (interpret-markup layout props (make-cycleII-markup m)))
18 #(define-markup-command (cycleII layout props m)
19   (markup?)
20   (interpret-markup layout props (make-cycleI-markup m)))
21
22
23 \markup { \cycle "a" }
24 \markup { \cycleI "a" }