- // get from AnnounceNewContext
- SCM cs = ev->get_property ("context");
- Context *new_context = unsmob_context (cs);
- Context_def *def = unsmob_context_def (new_context->get_definition ());
- SCM ops = new_context->get_definition_mods ();
-
- SCM trans_names = def->get_translator_names (ops);
-
- Translator_group *g = get_translator_group (def->get_translator_group_type ());
- SCM trans_list = SCM_EOL;
-
- for (SCM s = trans_names; scm_is_pair (s); s = scm_cdr (s))
- {
- Translator *type = get_translator (scm_car (s));
- if (!type)
- warning (_f ("can't find: `%s'", ly_symbol2string (scm_car (s)).c_str ()));
- else
- {
- Translator *tr = type->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_ = new_context;
- tr->unprotect ();
- }
- }