]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Introduce a maximum depth for markup evaluation
[lilypond.git] / scm / lily.scm
index bbea5afab996462f9eedb9a6ee3613f65581ce5a..f3ce9c33c0cb10215eafe252637df72ff719f566 100644 (file)
@@ -120,6 +120,9 @@ jobs.")
     (log-file #f
 "If string FOO is given as argument, redirect
 output to log file `FOO.log'.")
+    (max-markup-depth 1024
+"Maximum depth for the markup tree. If a markup has more levels, assume that
+it will not terminate at all and print out a warning, but continue processing.")
     (midi-extension ,(if (eq? PLATFORM 'windows)
                          "mid"
                          "midi")
@@ -348,11 +351,10 @@ Print a message at LOCATION if any predicate failed."
     (define (helper pred? arg count)
       (if (not (pred? arg))
           (begin
-            (ly:input-message
+            (ly:input-warning
              location
-             (format
-              #f (_ "wrong type for argument ~a.  Expecting ~a, found ~s")
-              count (type-name pred?) arg))
+             (_ "wrong type for argument ~a.  Expecting ~a, found ~s")
+              count (type-name pred?) arg)
             #f)
           #t))