- 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);
- }
- }
-
- g->simple_trans_list_ = trans_list;
-
- tg->implementation_ = g->self_scm ();
- if (dynamic_cast<Engraver*> (g))
- g->simple_trans_list_ = filter_performers (g->simple_trans_list_);
- else if (dynamic_cast<Performer*> (g))
- g->simple_trans_list_ = filter_engravers (g->simple_trans_list_);
-
- g->daddy_context_ = tg;
- tg->aliases_ = context_aliases_ ;
-
- scm_gc_unprotect_object (g->self_scm ());
-
- tg->accepts_list_ = get_accepted (ops);
-
- return tg;
-}
-
-SCM
-Context_def::clone_scm () const
-{
- Context_def *t = new Context_def (*this);
- SCM x = t->self_scm ();
- scm_gc_unprotect_object (x);
- return x;