+ finished_span_ = 0;
+ first_start_ = true;
+ span_ = 0;
+ span_events_[LEFT] = 0;
+ span_events_[RIGHT] = 0;
+}
+
+IMPLEMENT_TRANSLATOR_LISTENER (Staff_symbol_engraver, staff_span);
+void
+Staff_symbol_engraver::listen_staff_span (Stream_event *ev)
+{
+ Direction d = to_dir (ev->get_property ("span-direction"));
+ if (d)
+ ASSIGN_EVENT_ONCE (span_events_[d], ev);
+ else
+ programming_error (_ ("staff-span event has no direction"));
+}
+
+void
+Staff_symbol_engraver::process_music ()
+{
+ if (span_events_[STOP])
+ {
+ finished_span_ = span_;
+ span_ = 0;
+ if (first_start_)
+ first_start_ = false;
+ }
+
+ if (span_events_[START]
+ || (first_start_ && !span_events_[STOP]))
+ start_spanner ();
+}
+
+void
+Staff_symbol_engraver::start_spanner ()
+{
+ if (!span_)
+ {
+ span_ = make_spanner ("StaffSymbol", SCM_EOL);
+ span_->set_bound (LEFT,
+ unsmob_grob (get_property ("currentCommandColumn")));
+ }