From: David Kastrup Date: Fri, 28 Aug 2015 20:44:19 +0000 (+0200) Subject: Issue 4579: NR Changing Defaults: Explain sticky contexts accurately X-Git-Tag: release/2.19.27-1~18 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=40c43b9043488a86c03633b638251a2b76cb33b0;p=lilypond.git Issue 4579: NR Changing Defaults: Explain sticky contexts accurately --- diff --git a/Documentation/notation/changing-defaults.itely b/Documentation/notation/changing-defaults.itely index 246504aeb9..efcf8549b3 100644 --- a/Documentation/notation/changing-defaults.itely +++ b/Documentation/notation/changing-defaults.itely @@ -536,14 +536,19 @@ have to be referenced, for example, when changing staves with @code{\lyricsto} commands, or when adding further musical events to an earlier context. -There is an exception to this general rule: just one of the -@code{Voice} contexts in a @code{Staff} context or in a -@code{<<@dots{}>>} construct will always persist to the end of the -enclosing @code{Staff} context or @code{<<@dots{}>>} construct, even -though there may be periods when it has nothing to do. The context -to persist in this way will be the first one encountered in the -first enclosed @code{@{@dots{}@}} construct, ignoring any in enclosed -@code{<<@dots{}>>} constructs. +There is an exception to this general rule: inside of an +@code{@{@dots{}@}} construct (sequential music), the construct's +notion of the ``current context'' will descend whenever an element +of the sequence ends in a subcontext of the previous current +context. This avoids spurious creation of implicit contexts in a +number of situations but means that the first context descended +into will be kept alive until the end of the expression. + +In contrast, the contexts of a @code{<<@dots{}>>} construct's +(simultaneous music) expression are not carried forth, so +enclosing a context creating command in an extra pair of +@code{<<@dots{}>>} will keep the context from persisting through +all of the enclosing @code{@{@dots{}@}} sequence. Any context can be kept alive by ensuring it has something to do at every musical moment. @code{Staff} contexts are kept alive by