From: David Kastrup Date: Mon, 8 Oct 2012 21:54:19 +0000 (+0200) Subject: convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty X-Git-Tag: release/2.17.6-1~26^2~4 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a3d7090;p=lilypond.git convert-ly rule for \alterbroken, \accidentalStyle, \overrideProperty This is required since not all of the old call forms can be automatically recognized anymore, in particular not when the Scheme-only form #"Context.GrobName" is being used. --- diff --git a/python/convertrules.py b/python/convertrules.py index 5d44fd7a15..66ff152476 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -3423,6 +3423,18 @@ def conv(str): str = re.sub (barstring + r'"empty"', '\\1\\2"-"', str) return str +@rule ((2, 17, 6), r"""\accidentalStyle #'Context "style" -> \accidentalStyle Context.style +\alterBroken "Context.grob" -> \alterBroken Context.grob +\overrideProperty "Context.grob" -> \overrideProperty Context.grob""") +def conv (str): + str = re.sub (r'''(\\accidentalStyle\s+)#?"([-A-Za-z]+)"''', + r"\1\2", str) + str = re.sub (r'''(\\accidentalStyle\s+)#'([A-Za-z]+)\s+#?"?([-A-Za-z]+)"?''', + r"\1\2.\3", str) + str = re.sub (r'''(\\(?:alterBroken|overrideProperty)\s+)#?"([A-Za-z]+)\s*\.\s*([A-Za-z]+)"''', + r"\1\2.\3", 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,