From ae6b04fdad7b662593cc49245d9a681556cb839c 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. --- scm/translation-functions.scm | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scm/translation-functions.scm b/scm/translation-functions.scm index 0f4e4ce..2e4b8a6 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))) -- 1.5.4.3