Han-Wen Nienhuys <[EMAIL PROTECTED]> writes:

> \translator {} creates a new context definition. If you say
> \FooContext within translator{}, the contents of \FooContext (another
> context definition) is copied into the newly created context definition.

...

> Yes, as Mats explained, it is possible to have multiple alternative
> definitions for Staff and Score.

Ah, I'm beginning to see the light at the end of the tunnel...

So what \translator does (besides defining a new context definition)
is that it replaces the previous mapping name->context definition with
a new one?

I hadn't realized that \translator actually "returned" a new
translator that you could assign to a variable such as is done in
engraver.ly.  But there is somethihg weird still in that file.

  StaffContext=\translator {
          \type "Engraver_group_engraver";
          \name Staff ;
          ... lots of other stuff ...
  };

  \translator{\StaffContext }
  ... more contexts ...

That makes me wonder what this last line does?  Looking in parser.yy,
I can see that \translator does two different things when the body
starts with a TRANS_IDENTIFIER (whatever that is...) and when it
starts with a \type.

-- 
David Kågedal

Reply via email to