- if (type_p != SCM_EOL && !gh_procedure_p (type_p))
- {
- warning (_f ("Can't find property type-check for `%s'. Perhaps you made a typing error? Doing assignment anyway.",
- ly_symbol2string (sym).ch_C ()));
- }
- else
- {
- if (val != SCM_EOL
- && gh_procedure_p (type_p)
- && gh_call1 (type_p, val) == SCM_BOOL_F)
- {
- SCM errport = scm_current_error_port ();
- ok = false;
- SCM typefunc = scm_primitive_eval (ly_symbol2scm ("type-name"));
- SCM type_name = gh_call1 (typefunc, type_p);
-
- scm_puts (_f ("Type check for `%s' failed; value `%s' must be of type `%s'",
- ly_symbol2string (sym).ch_C (),
- ly_scm2string (ly_write2scm (val)).ch_C (),
- ly_scm2string (type_name).ch_C ()).ch_C (),
- errport);
- scm_puts ("\n", errport);
- }
- }
- return ok;
+bool translator_accepts_any_of (Translator*tr, SCM ifaces)
+{
+ SCM ack_ifs = scm_assoc (ly_symbol2scm ("events-accepted"),
+ tr->translator_description());
+ ack_ifs = gh_cdr (ack_ifs);
+ for (SCM s = ifaces; ly_pair_p (s); s = ly_cdr (s))
+ if (scm_memq (ly_car (s), ack_ifs) != SCM_BOOL_F)
+ return true;
+ return false;