+ SCM accs = me->get_object ("accidental-grobs");
+ if (!scm_is_pair (accs))
+ return SCM_BOOL_T;
+
+ vector<Accidental_placement_entry*> apes = build_apes (accs);
+
+ Grob *common[] = {me, 0};
+
+ vector<Grob*> heads_and_stems = extract_heads_and_stems (apes);
+
+ common[Y_AXIS] = common_refpoint_of_accidentals (apes, Y_AXIS);
+ common[Y_AXIS] = common_refpoint_of_array (heads_and_stems, common[Y_AXIS], Y_AXIS);
+ common[X_AXIS] = common_refpoint_of_array (heads_and_stems, me, X_AXIS);
+
+ for (vsize i = apes.size (); i--;)
+ set_ape_skylines (apes[i], common);
+ Skyline heads_skyline = build_heads_skyline (heads_and_stems, common);
+
+ stagger_apes (&apes);
+ Interval width = position_apes (me, apes, heads_skyline);
+
+ me->flush_extent_cache (X_AXIS);
+ me->set_property ("X-extent", ly_interval2scm (width));
+
+ junk_pointers (apes);