Carl Sorensen <c_soren...@byu.edu> writes: > On 8/21/11 1:45 AM, "David Kastrup" <d...@gnu.org> wrote: > >> My suggestion >> would be >> >> \set x = 4 ; setting the default >> \override x = 5 ; context set has 5 >> \override x = 2 ; context set has 5 2, result 5 >> \once\override x = 3 ; context set has 3(o) 5 2, result 3 >> \revert x ; context set has 3(o) 2, result 3 >> [wait ...] ; context set has 2 result 2 >> > Yes, this is clearly better than my proposal.
Also wrong, since I mixed up the order of 2 and 5. I hope you understood what I meant rather than what I wrote. The following should be better: \set x = 4 ; setting the default \override x = 5 ; context set has 5 \override x = 2 ; context set has 2 5, result 2 \once\override x = 3 ; context set has 3(o) 2 5, result 3 \revert x ; context set has 3(o) 5, result 3 [wait ...] ; context set has 5 result 5 Anyway, I chose to let \revert have a delayed action as the lesser evil over letting it have both an immediate as well as an independent delayed action. The latter just feigns to be unsurprising. > I agree that the semantics you propose are cleaner to explain. It > would even be simple to add a warning if \once \revert found no \once > entry on the stack to \revert, so the user wouldn't be surprised. Well, \set is pretty much equivalent to revert+override, and at least this implicit revert should rather be silent. But anyway, that's a detail not influencing the design of the code. -- David Kastrup _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel