From: Neil Puttock Date: Wed, 24 Sep 2008 23:13:44 +0000 (+0100) Subject: Ensure format-metronome-markup always returns markup. X-Git-Tag: release/2.11.62-1~25^2~1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2e30eb4cc0cfddc506b5dfd8271db7fe924f812d;p=lilypond.git Ensure format-metronome-markup always returns markup. - 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 --- diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index 0f4e4ce31a..2e4b8a6304 100644 --- a/scm/translation-functions.scm +++ b/scm/translation-functions.scm @@ -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)))