]> git.donarmstrong.com Git - lilypond.git/commitdiff
Ensure format-metronome-markup always returns markup.
authorNeil Puttock <n.puttock@gmail.com>
Wed, 24 Sep 2008 23:13:44 +0000 (00:13 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Mon, 6 Oct 2008 19:42:52 +0000 (21:42 +0200)
- if tempoHideNote = ##t and there's no tempo string or markup, return
\null.
- rename hide_not to hide-note to be consistent with other variable names

Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
scm/translation-functions.scm

index 0f4e4ce31a2ce2c2604037b8665fd7aeab2cbfb8..2e4b8a63049c0b72683f0d519b39edc0e5c8207c 100644 (file)
@@ -7,21 +7,21 @@
 
 ;; metronome marks
 (define-public (format-metronome-markup text dur count context)
-  (let* ((hide_note (eq? #t (ly:context-property context 'tempoHideNote)))
-        (note-mark (if (and (not hide_note) (ly:duration? dur))
+  (let* ((hide-note (eq? #t (ly:context-property context 'tempoHideNote)))
+        (note-mark (if (and (not hide-note) (ly:duration? dur))
                       (make-smaller-markup
                       (make-note-by-number-markup (ly:duration-log dur)
                                                   (ly:duration-dot-count dur)
                                                   1))
-                     #f))
-         (note-markup (if (and note-mark (number? count) (> count 0) )
+                     (make-null-markup)))
+         (note-markup (if (and (not hide-note) (number? count) (> count 0) )
                         (make-concat-markup (list
                           (make-general-align-markup Y DOWN note-mark)
                           (make-simple-markup " ")
                           (make-simple-markup  "=")
                           (make-simple-markup " ")
                           (make-simple-markup (number->string count))))
-                        #f))
+                      (make-null-markup)))
          (text-markup (if (not (null? text))
                         (make-bold-markup text)
                         #f)))