From 2e30eb4cc0cfddc506b5dfd8271db7fe924f812d Mon Sep 17 00:00:00 2001 From: Neil Puttock Date: Thu, 25 Sep 2008 00:13:44 +0100 Subject: [PATCH] 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 --- scm/translation-functions.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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))) -- 2.39.2