-SCM
-slur_get_bound (SCM slur, SCM dir)
-{
- return ((Slur*)unsmob_element (slur))->get_bound (to_dir (dir))->self_scm_;
-}
+ SCM att = me->get_grob_property ("attachment");
+ /*
+ */
+ if (!gh_pair_p (att))
+ {
+ programming_error ("attachment is not a cons?!");
+ att = gh_cons (SCM_EOL, SCM_EOL);
+ me->set_grob_property ("attachment", att);
+ }
+
+ Direction dir = LEFT;
+ do
+ {
+
+ if (!gh_symbol_p (index_get_cell (att, dir)))
+ {
+ for (SCM s = me->get_grob_property ("extremity-rules");
+ s != SCM_EOL; s = ly_cdr (s))
+ {
+ SCM r = gh_call2 (ly_caar (s), me->self_scm (),
+ gh_int2scm ((int)dir));
+ if (r != SCM_BOOL_F)
+ {
+ index_set_cell (att, dir,
+ ly_cdar (s));
+ break;
+ }
+ }
+ }
+ }
+ while (flip (&dir) != LEFT);