]> git.donarmstrong.com Git - lilypond.git/commit
Implement function check-grob-path for checking/extending grob path specs
authorDavid Kastrup <dak@gnu.org>
Thu, 25 Oct 2012 12:42:25 +0000 (14:42 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 30 Oct 2012 21:41:06 +0000 (22:41 +0100)
commit2188505a75fb36893b0ec261c6bc194a201ec66e
treebb44860bed86f122423a3d9e599c4d5c07626669
parentfee3b13a83abaf23c9f9d91cba71040c2f660921
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.
scm/music-functions.scm