From: David Kastrup Date: Fri, 18 Nov 2011 16:02:32 +0000 (+0100) Subject: Add \accidentalStyle command X-Git-Tag: release/2.15.20-1~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=12fecbc3e7e848785dbb4aa2e4258ca32eacedbe;p=lilypond.git Add \accidentalStyle command --- diff --git a/ly/property-init.ly b/ly/property-init.ly index 60232edce0..c5bf597b6e 100644 --- a/ly/property-init.ly +++ b/ly/property-init.ly @@ -14,6 +14,13 @@ defaultNoteHeads = (revert-head-style '(NoteHead TabNoteHead))) +accidentalStyle = +#(define-music-function + (parser location style) (string-or-symbol?) + (_i "Set @var{style} as the accidental style to use.") + (set-accidental-style (if (string? style) + (string->symbol style) + style))) %% arpeggios diff --git a/python/convertrules.py b/python/convertrules.py index 6ea53ea37d..c10a22bb52 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3346,6 +3346,12 @@ def conv (str): stderr_write ('\n') return str +@rule ((2, 15, 20), r"$(set-accidental-style ...) -> \accidentalStyle") +def conv (str): + str = re.sub (r"\$\(set-accidental-style\s+'([-a-z]+)\)", + r'\\accidentalStyle "\1"', 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,