From 0619c6dfd6d2a744e70fc0b3f97a8b9adfc5d987 Mon Sep 17 00:00:00 2001 From: Trevor Daniels Date: Fri, 4 Jan 2013 08:47:49 +0000 Subject: [PATCH] Doc: Update documentation of \once (2952) 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 | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Documentation/learning/tweaks.itely b/Documentation/learning/tweaks.itely index 96b4450df1..c1db7e9747 100644 --- a/Documentation/learning/tweaks.itely +++ b/Documentation/learning/tweaks.itely @@ -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 -- 2.39.2