]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: LM adjusted explanation for \once
authorJames Lowe <pkx16h@gmail.com>
Sun, 1 Jan 2012 12:17:44 +0000 (12:17 +0000)
committerJames Lowe <pkx166h@gmail.com>
Wed, 4 Jan 2012 08:00:45 +0000 (08:00 +0000)
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

index 6e6f73321024a92b16374d343c5ad84042c519d4..d8903d9129c3c1f4d9c7443257eeba53ff58eb01 100644 (file)
@@ -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}