+ LY_ASSERT_SMOB (Output_def, output_def, 1);
+ if (!SCM_UNBNDP (context_name))
+ LY_ASSERT_TYPE (ly_is_symbol, context_name, 2);
+
+ Output_def *id = unsmob<Output_def> (output_def);
+
+ SCM al = ly_module_2_alist (id->scope_);
+ SCM ell = SCM_EOL;
+ for (SCM s = al; scm_is_pair (s); s = scm_cdr (s))
+ {
+ SCM p = scm_car (s);
+ Context_def *td = unsmob<Context_def> (scm_cdr (p));
+ if (td && scm_is_eq (scm_car (p), td->get_context_name ())
+ && (SCM_UNBNDP (context_name) || td->is_alias (context_name)))
+ ell = scm_cons (p, ell);
+ }
+ return ell;