-SCM
-lookup_nested_property (SCM alist,
- SCM grob_property_path)
-{
- if (scm_is_pair (grob_property_path))
- {
- SCM sym = scm_car (grob_property_path);
- SCM handle = scm_assq (sym, alist);
-
- if (handle == SCM_BOOL_F)
- return SCM_EOL;
- else
- return lookup_nested_property (scm_cdr (handle),
- scm_cdr (grob_property_path));
- }
- else
- return alist;
-}
-
-/*
- copy ALIST leaving out SYMBOL. Copying stops at ALIST_END
-*/
-SCM
-evict_from_alist (SCM symbol,
- SCM alist,
- SCM alist_end)
-{
- SCM new_alist = SCM_EOL;
- SCM *tail = &new_alist;
-
- while (alist != alist_end)
- {
- if (ly_is_equal (scm_caar (alist), symbol))
- {
- alist = scm_cdr (alist);
- break;
- }
-
- *tail = scm_cons (scm_car (alist), SCM_EOL);
- tail = SCM_CDRLOC (*tail);
- alist = scm_cdr (alist);
- }
-
- *tail = alist;
- return new_alist;
-}