+ if (!scm_is_pair (sym))
+ sym = scm_list_1 (sym);
+
+ Context *c = find_context_above (context (), context_name);
+ if (c)
+ {
+ SCM cell = Grob_property_info (c, grob).push (sym, val);
+ grace_settings_
+ = scm_cons (scm_cons2 (c->self_scm (), grob, cell), grace_settings_);
+ }
+ else
+ programming_error ("cannot find context from graceSettings: "
+ + ly_symbol2string (context_name));
+ }
+ }
+ if (last_moment_ == Rational (-1))
+ {
+ Dispatcher *d = context ()->event_source ();
+ d->add_listener (GET_LISTENER (Grace_engraver, grace_change), ly_symbol2scm ("GraceChange"));
+ }