X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fcontext-def.cc;h=9ef10bea966a6f631b2338138cfc46836342dfd1;hb=f0a8d907612e79271f97a2936165f57505b12350;hp=1f823bf50368f747aff414b68bd6e8181c6b9b7c;hpb=cb951038d3e74a85ec8539d0dc51260088251556;p=lilypond.git diff --git a/lily/context-def.cc b/lily/context-def.cc index 1f823bf503..9ef10bea96 100644 --- a/lily/context-def.cc +++ b/lily/context-def.cc @@ -316,6 +316,7 @@ Context_def::instantiate (SCM ops) context->definition_mods_ = ops; context->aliases_ = context_aliases_; context->accepts_list_ = get_accepted (ops); + context->default_child_ = get_default_child (ops); return context; } @@ -342,6 +343,10 @@ Context_def::to_alist () const get_translator_names (SCM_EOL)), ell); ell = scm_cons (scm_cons (ly_symbol2scm ("description"), description_), ell); ell = scm_cons (scm_cons (ly_symbol2scm ("aliases"), context_aliases_), ell); + ell = scm_cons (scm_cons (ly_symbol2scm ("accepts"), get_accepted (SCM_EOL)), + ell); + if (scm_is_symbol (default_child_)) + ell = scm_acons (ly_symbol2scm ("default-child"), default_child_, ell); ell = scm_cons (scm_cons (ly_symbol2scm ("accepts"), get_accepted (SCM_EOL)), ell); ell = scm_cons (scm_cons (ly_symbol2scm ("property-ops"), property_ops_), @@ -381,7 +386,7 @@ bool Context_def::is_alias (SCM sym) const { if (scm_is_eq (sym, ly_symbol2scm ("Bottom"))) - return !scm_is_pair (get_accepted (SCM_EOL)); + return !scm_is_symbol (get_default_child (SCM_EOL)); if (scm_is_eq (sym, get_context_name ())) return true;