]> git.donarmstrong.com Git - lilypond.git/commitdiff
Doc: Update documentation of \once (2952)
authorTrevor Daniels <t.daniels@treda.co.uk>
Fri, 4 Jan 2013 08:47:49 +0000 (08:47 +0000)
committerTrevor Daniels <t.daniels@treda.co.uk>
Wed, 9 Jan 2013 14:29:44 +0000 (14:29 +0000)
  Bring documentation in line with committish
  ddce9767f975c989800cb99e003039a8bf050b45
  by removing statements that limit the use of
  \once to bare \override and \set commands.

Documentation/learning/tweaks.itely

index 96b4450df10206c2301114120a3c2bdf8771992d..c1db7e9747f333ff34a584d1a7f3d66e84ca32dc 100644 (file)
@@ -307,7 +307,7 @@ note like this:
 @cindex color property, example
 @cindex NoteHead, example of overriding
 
-@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
+@lilypond[quote,verbatim,relative=1]
 c4 d
 \override NoteHead.color = #red
 e4 f |
@@ -317,6 +317,23 @@ g4 a
 b c |
 @end lilypond
 
+The @code{\once} prefix may also be used in front of many
+predefined commands to limit their effect to one musical moment:
+
+@lilypond[quote,verbatim,relative=1]
+c4 d
+\once \stemDown
+e4 f |
+g4 a
+\once \hideNotes
+b c |
+@end lilypond
+
+However, predefined commands of the form @code{\...Neutral},
+@code{\...Off} and @code{\un...} use @code{\revert} internally rather
+than @code{\override} so prefixing these with @code{\once} has no
+effect.
+
 
 @node The \overrideProperty command
 @unnumberedsubsubsec The @code{\overrideProperty} command
@@ -2265,9 +2282,9 @@ c2^"Text4" |
 @end lilypond
 
 The command to revert to the default behavior is
-@code{\textLengthOff}.  Remember @code{\once} only works with
-@code{\override}, @code{\set}, @code{\revert} or @code{\unset},
-so cannot be used with @code{\textLengthOn}.
+@code{\textLengthOff}.  Alternatively, @code{\once} may be used
+with @code{\textLengthOn} if the effect is to be limited to just a
+single musical moment.
 
 @cindex markup text, allowing collisions