- Context *tg = 0;
-
- if (context_name_ == ly_symbol2scm ("Score"))
- tg = new Score_context (key);
- else
- tg = new Context (key);
-
- tg->definition_ = self_scm ();
-
- SCM trans_names = get_translator_names (ops);
-
- Translator_group *g = dynamic_cast<Translator_group *>
- (get_translator (translator_group_type_));
- g = dynamic_cast<Translator_group *> (g->clone ());
-
- SCM trans_list = SCM_EOL;
-
- for (SCM s = trans_names; scm_is_pair (s); s = scm_cdr (s))
- {
- Translator *t = get_translator (scm_car (s));
- if (!t)
- warning (_f ("can't find: `%s'", s));
- else
- {
- Translator *tr = t->clone ();
- SCM str = tr->self_scm ();
-
- if (tr->must_be_last ())
- {
- SCM cons = scm_cons (str, SCM_EOL);
- if (scm_is_pair (trans_list))
- scm_set_cdr_x (scm_last_pair (trans_list), cons);
- else
- trans_list = cons;
- }
- else
- {
- trans_list = scm_cons (str, trans_list);
- }
-
- tr->daddy_context_ = tg;
- scm_gc_unprotect_object (str);
- }
- }
-
-
- /*
- Ugh, todo: should just make a private
- copy of Context_def with the user mods.
- */