]> git.donarmstrong.com Git - lilypond.git/commit
Create \temporary for doing overrides without pop-first set
authorDavid Kastrup <dak@gnu.org>
Tue, 23 Oct 2012 05:52:45 +0000 (07:52 +0200)
committerJanek Warchoł <janek.lilypond@gmail.com>
Tue, 23 Oct 2012 05:52:45 +0000 (07:52 +0200)
commit5c4b80afe97acbe20199a3aa71a0d63172112f23
tree4c8b9f2b260da0549be3d852f5f4e582769a5727
parent3bd44774846d56ae9f04971fa401c210539e5eaa
Create \temporary for doing overrides without pop-first set

Normal overrides change the top of the current property stack rather
than pushing to it, by having the pop-first property set in the music.

\temporary will remove this property from its argument's overrides.
For property-changing music that is not an override, a warning will be
generated.

Calling \temporary \override and \revert in succession on the same
property will have a net effect of zero.  Similarly, pairing
\temporary and \undo on the same music containing overrides will have
a net effect of zero.

In more complex arrangements, \revert will revert to the state before
the last (matching) \temporary override of the same property.

Properties are maintained conceptually using one stack per property
per grob per context.  Using \push/\pop instead of \temporary/\undo
was deemed unsuitable for a musician-accessible user interface.
ly/music-functions-init.ly