- SCM newval = (type == grob_list_p)
- ? substitute_grob_list (val)
- : do_break_substitution (val);
-
- /*
- For the substitution of a single property, we tack the result onto
- mutable_property_alist_ ; mutable_property_alist_ is empty after
- Grob::Grob (Grob const&), except that System has all-elements set,
- as a side product of typeset_grob () on newly copied spanners.
-
- Here we clear that list explicitly to free some memory and
- counter some of the confusion I encountered while debugging
- another problem
-
- (hwn 4/2/04)
- */
- if (sym == ly_symbol2scm ("all-elements"))
- sc->mutable_property_alist_
- = scm_assq_remove_x (sc->mutable_property_alist_,
- ly_symbol2scm ("all-elements"));
-
- sc->mutable_property_alist_ = scm_cons (scm_cons (sym, newval),
- sc->mutable_property_alist_);
+ if (grob_array)
+ {
+ SCM newval = sc->internal_get_object (sym);
+ if (!unsmob_grob_array (newval))
+ {
+ newval = Grob_array::make_array ();
+ sc->set_object (sym, newval);
+ }
+ substitute_grob_array (grob_array, unsmob_grob_array (newval));
+ }
+ else
+ {
+ SCM newval = do_break_substitution (val);
+ sc->set_object (sym, newval);
+ }