- body_length_ = Repeated_music::body_get_length (m);
- int count = Repeated_music::repeat_count (m);
-
- Moment now = now_mom ();
- start_mom_ = now;
- stop_mom_ = start_mom_ + Moment (count) * body_length_;
- next_moment_ = start_mom_ + body_length_;
-
- Moment meas_len (robust_scm2moment (get_property ("measureLength"), Moment (1)));
- if (meas_len == body_length_)
- repeat_sign_type_ = MEASURE;
- else if (Moment (2) * meas_len == body_length_)
- {
- repeat_sign_type_ = DOUBLE_MEASURE;
- }
- else
- {
- warning (_f ("can't handle a percent repeat of length: %s",
- body_length_.to_string ()));
- return false;
- }
-
- repeat_ = m;
-
- Global_context *global = get_global_context ();
- for (int i = 1; i < count; i++)
- {
- Moment m = next_moment_ + Moment (i) * body_length_;
- global->add_moment_to_process (m);
-
- /* bars between % too. */
- if (repeat_sign_type_ == DOUBLE_MEASURE)
- global->add_moment_to_process (m - meas_len);
- }
-
- if (repeat_sign_type_ == DOUBLE_MEASURE)
- next_moment_ += meas_len;
-
- return true;
+ first_command_column_
+ = unsmob<Grob> (get_property ("currentCommandColumn"));
+ command_moment_ = now_mom ();
+ }
+
+ if (stop_mom_.main_part_ == now_mom ().main_part_)
+ {
+ if (percent_)
+ typeset_perc ();
+ percent_event_ = 0;