+/* inserts the source alist into the destination alist, erasing old entries.
+ result is: dest = merged
+*/
+static SCM merge_alists_front_x (SCM src, SCM dest) {
+ if(gh_pair_p(src)) {
+ dest = merge_alists_front_x(ly_cdr(src),dest);
+ dest = ly_assoc_front_x(dest, ly_caar(src), ly_cdar(src));
+ }
+ return dest;
+}
+
+static void merge_property_on_children (Translator_group * trans,
+ const char * from_sym, const char * to_sym)
+{
+ SCM from = trans->get_property(from_sym);
+ SCM to = trans->get_property(to_sym);
+ to = merge_alists_front_x(from, to);
+ trans->set_property (to_sym, to);
+ trans->set_property (from_sym, SCM_EOL);
+ for (SCM p = trans -> trans_group_list_; gh_pair_p (p); p = ly_cdr(p)) {
+ Translator_group *trg = dynamic_cast<Translator_group*> (unsmob_translator (ly_car (p)));
+ merge_property_on_children(trg, from_sym, to_sym);
+ }
+}
+
+static void merge_property_on_family (Translator_group * trans,
+ const char * from_sym, const char * to_sym)
+{
+ merge_property_on_children (trans, from_sym, to_sym);
+ trans = trans->daddy_trans_;
+ while (trans)
+ {
+ SCM from = trans->get_property(from_sym);
+ SCM to = trans->get_property(to_sym);
+ to = merge_alists_front_x(from, to);
+ trans->set_property (to_sym, to);
+ trans->set_property (from_sym, SCM_EOL);
+ trans = trans->daddy_trans_;
+ }
+}
+
+static void set_property_on_children (Translator_group * trans, const char * sym, SCM val)