From d7bf0e87283f48e945bc228b1ba79571d636a528 Mon Sep 17 00:00:00 2001 From: James Lowe Date: Sun, 1 Jan 2012 12:17:44 +0000 Subject: [PATCH] Doc: LM adjusted explanation for \once This is for Tracker issue 2164 As suggested by email on lilypond-user Updated example and text to show that after using \once, the 'revert' does not necessarily go back to the 'default' value as originally stated, if another \override is still in place. --- Documentation/learning/tweaks.itely | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/Documentation/learning/tweaks.itely b/Documentation/learning/tweaks.itely index 6e6f733210..d8903d9129 100644 --- a/Documentation/learning/tweaks.itely +++ b/Documentation/learning/tweaks.itely @@ -278,22 +278,25 @@ b4 c | @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 moment before the property reverts -back to its default value. Using the same example, we can -change the color of a single note like this: +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 +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 +note like this: @cindex color property, example @cindex NoteHead, example of overriding @lilypond[quote,fragment,ragged-right,verbatim,relative=1] c4 d -\once \override NoteHead #'color = #red +\override NoteHead #'color = #red e4 f | \once \override NoteHead #'color = #green -g4 a b c | +g4 a +\revert NoteHead #'color +b c | @end lilypond @strong{\overrideProperty command} -- 2.39.5