Han-Wen Nienhuys <[EMAIL PROTECTED]> writes:
> > Absolutely. What I haven't figured out is the relationthips between
> >
> > 1. Contexts as a global data structure, containing engravers etc.
> > 2. \FooContext identifiers used in \translator blocks
> > 3. \name, which Mats mentioned. I didn't know about this.
> > 4. The context "instances" used while engraving.
> > 5. The \context Identifiers used in the scores.
> >
> > My understanding is that when lilypond created context instances (4)
> > while processing a score it uses the \context information (5) to find
> > an appropriate context definition (1). But how it does this, I don't
> > know.
>
>
> Context instances are created during interpreting. They are created
> either by default or when
>
> \context CNAME
>
> is encountered. CNAME is used to find the context definition that has
> a matching \name, i.e. that looks like
>
> \translator {
> ...
> \name CNAME;
> }
>
> The implementation of a context instance, is a collection of C++
> objects known as Engravers, held together by a
> Engraver_group_engraver object.
>
> \FooContext is unrelated to the above: it is just a way of referring
> to a previous definition of a context.
I see. A couple of more questions.
Can more than one context definition have the same \name, and if so,
what determines which one is used?
What does \translator really do? Does it create a new context
definition based on a previous one, or does it modify the old context
definition? Is there a reason not to use the \name to identify the
previous definition in \translator?
--
David K�gedal