From: David Kastrup Date: Sun, 4 Aug 2013 09:36:34 +0000 (+0200) Subject: Make tempo range \tempo 20~30 be input as \tempo 20-30 instead X-Git-Tag: release/2.17.25-1~13^2~6^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=51697e92e7deb4281b6602928f7bbd3e99ee7b36;p=lilypond.git Make tempo range \tempo 20~30 be input as \tempo 20-30 instead \tempo's use of ~ was rather untypical for LilyPond. Letting it rather use @code{-} for ranges leaves just a single use for ties, making it feasible to make @code{~} definable by the user in a later commit. --- diff --git a/Documentation/changes.tely b/Documentation/changes.tely index 419dad0e81..c2ada64c4b 100644 --- a/Documentation/changes.tely +++ b/Documentation/changes.tely @@ -61,6 +61,10 @@ which scares away people. @end ignore +@item +Tempo change ranges are now written as @code{\tempo 4 = 60 - 68} +rather than @code{\tempo 4 = 60 ~ 68}. + @item Grob @code{OctavateEight} was renamed to @code{ClefModifier}. Related context properties were renamed from @code{xxxOctavationyyy} diff --git a/lily/parser.yy b/lily/parser.yy index a7d7285a06..3a64654197 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -3188,7 +3188,7 @@ tempo_range: UNSIGNED { $$ = $1; } - | UNSIGNED '~' UNSIGNED { + | UNSIGNED '-' UNSIGNED { $$ = scm_cons ($1, $3); } ; diff --git a/python/convertrules.py b/python/convertrules.py index 121b12182c..6f0a0f1a04 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3591,6 +3591,16 @@ def conv(str): r"\1", str) return str +@rule((2, 17, 25), r'''\tempo 4. = 50~60 -> \tempo 4. = 50-60''') +def conv(str): +# This goes for \tempo commands ending with a range, like +# = 50 ~ 60 +# and uses - instead. We don't explicitly look for \tempo since the +# complete syntax has a large number of variants, and this is quite +# unlikely to occur in other contexts + str = re.sub (r"(=\s*[0-9]+\s*)~(\s*[0-9]+\s)", r"\1-\2", str) + return str + # Guidelines to write rules (please keep this at the end of this file) # # - keep at most one rule per version; if several conversions should be done, diff --git a/scm/define-music-display-methods.scm b/scm/define-music-display-methods.scm index 537e5d24df..ccbeee6ad6 100644 --- a/scm/define-music-display-methods.scm +++ b/scm/define-music-display-methods.scm @@ -917,7 +917,7 @@ Otherwise, return #f." '()) (duration->lily-string ?unit #:force-duration #t) (if (pair? ?count) - (format #f "~a ~~ ~a" (car ?count) (cdr ?count)) + (format #f "~a - ~a" (car ?count) (cdr ?count)) ?count) (new-line->lily-string))))