@end ignore
+@item
+All of @code{\override}, @code{\revert}, @code{\set}, and
+@code{\unset} now work with the @code{\once} prefix for making
+one-time settings.
+@lilypond[quote,verbatim]
+\relative {
+ c'4 d
+ \override NoteHead.color = #red
+ e4 f |
+ \once \override NoteHead.color = #green
+ g4 a
+ \once \revert NoteHead.color
+ b c |
+ \revert NoteHead.color
+ f2 c |
+}
+@end lilypond
+
@item
When outputting MIDI, LilyPond will now store the @code{title}
defined in a score's @code{\header} block (or, if there is no
@funindex \once
@funindex once
-Both the @code{\override} and the @code{\set} commands may be prefixed
-by @code{\once}. This causes the following @code{\override} or
-@code{\set} command to be effective only during the current musical
+@code{\override}, @code{\revert}. @code{\set}, and @code{\unset}
+commands may be prefixed with @code{\once}. This causes such a
+command to be effective only during the current musical
moment before the property reverts back to its previous value (this can
be different from the default if another @code{\override} is still in
effect). Using the same example, we can change the color of a single
e4 f |
\once \override NoteHead.color = #green
g4 a
- \revert NoteHead.color
+ \once \revert NoteHead.color
b c |
+ \revert NoteHead.color
+ f2 c |
}
@end lilypond
}
@end lilypond
-However, predefined commands of the form @code{\@dots{}Neutral},
-@code{\@dots{}Off} and @code{\un@dots{}} use @code{\revert} internally
-rather than @code{\override} so prefixing these with @code{\once} has no
-effect.
-
-
@node The overrideProperty command
@unnumberedsubsubsec The @code{@bs{}overrideProperty} command
@cindex \once
-Preceding a @code{\set} command by @code{\once} makes the
-setting apply to only a single time-step:
+Preceding a @code{\set} or @code{\unset} command by @code{\once}
+makes the setting apply to only a single time-step:
@lilypond[quote,fragment,verbatim]
c''4
@funindex \once
@cindex overriding for only one moment
-@code{\once} can be used with @code{\override}
+@code{\once} can be used with @code{\override} or @code{\revert}
to affect only the current time step:
@lilypond[quote,verbatim]