DescriptionChange \alterBroken interface to match that of other tweak/overrides
I am not really fabulously happy about this particular syntax change,
but it makes alter-broken more versatile (and let's face it, this
likely needs to get used at least as often once rather than as a
general override) and lets it match the API of the other
tweak/override-like functions. Suggestions for improvements welcome.
check-grob-path is stolen from another issue that is still under
review.
Here are the containing commits:
Change input/regression/alter-broken.ly to include tweak-like usage
Rerun scripts/auxiliar/update-with-convert-ly.sh
Because the version did not change, this required a git revert -n of the
last such run beforehand.
Change \alterBroken interface to match that of other tweak/overrides
Implement function check-grob-path for checking/extending grob path specs
From the function documentation string:
Check a grob path specification @var{path}, a symbol list (or a
single symbol), for validity and possibly complete it. Returns the
completed specification, or @code{#f} if invalid. If optional
@var{parser} is given, a syntax error is raised in that case,
optionally using @var{location}. If an optional keyword argument
@code{#:start @var{start}} is given, the parsing starts at the given
index in the sequence @samp{Context.Grob.property.sub-property...},
with the default of @samp{0} implying the full path.
If there is no valid first element of @var{path} fitting at the given
path location, an optionally given @code{#:default @var{default}} is
used as the respective element instead without checking it for
validity at this position.
The resulting path after possibly prepending @var{default} can be
constrained in length by optional arguments @code{#:min @var{min}} and
@code{#:max @var{max}}, defaulting to @samp{1} and unlimited,
respectively.
Patch Set 1 #Patch Set 2 : input/regression/alter-broken.ly: Use \once\alterBroken on Tie, a typical single-use case #
MessagesTotal messages: 1
|