5 evict_from_alist (SCM symbol,
9 SCM new_alist = SCM_EOL;
10 SCM *tail = &new_alist;
12 while (alist != alist_end)
14 if (ly_is_equal (scm_caar (alist), symbol))
16 alist = scm_cdr (alist);
20 *tail = scm_cons (scm_car (alist), SCM_EOL);
21 tail = SCM_CDRLOC (*tail);
22 alist = scm_cdr (alist);
30 PROP_PATH should be big-to-small ordering
33 nested_property_alist (SCM alist, SCM prop_path, SCM value)
35 SCM new_value = SCM_BOOL_F;
36 if (scm_is_pair (scm_cdr (prop_path)))
38 SCM sub_alist = ly_assoc_get (scm_car (prop_path), alist, SCM_EOL);
39 new_value = nested_property_alist (sub_alist, scm_cdr (prop_path), value);
46 return scm_acons (scm_car (prop_path), new_value, alist);
50 nested_property_revert_alist (SCM alist, SCM prop_path)
52 SCM new_sub_alist = SCM_EOL;
53 SCM sym = scm_car (prop_path);
54 if (scm_is_pair (scm_cdr (prop_path)))
56 SCM sub_alist = ly_assoc_get (sym, alist, SCM_EOL);
57 new_sub_alist = nested_property_revert_alist (sub_alist, scm_cdr (prop_path));
61 new_sub_alist = evict_from_alist (sym, alist, SCM_EOL);
64 return scm_acons (sym, new_sub_alist, alist);
69 set_nested_property (Grob *me, SCM big_to_small, SCM value)
71 SCM alist = me->get_property (scm_car (big_to_small));
73 alist = nested_property_alist (alist, scm_cdr (big_to_small), value);
75 me->set_property (scm_car (big_to_small),