- // Partial_iterator is an iterator rather than an engraver,
- // so the active context it is getting called in does not
- // depend on which context definition the engraver might be
- // defined.
- //
- // Using where_defined to find the context where
- // measurePosition should be overwritten does not actually
- // work since the Timing_translator does not set
- // measurePosition when initializing.
-
- Context *timing = Context::unsmob
- (scm_call_2 (ly_lily_module_constant ("ly:context-find"),
- get_outlet ()->self_scm (),
- ly_symbol2scm ("Timing")));
- if (!timing)
- programming_error ("missing Timing in \\partial");
- else
- {
- Moment mp = robust_scm2moment
- (timing->get_property ("measurePosition"),
- Rational (0));
- mp.main_part_ = 0;
- timing->set_property
- ("measurePosition", (mp - length).smobbed_copy ());
- }
+ Moment mp = robust_scm2moment
+ (timing->get_property ("measurePosition"),
+ Rational (0));
+ mp.main_part_ = 0;
+ timing->set_property
+ ("measurePosition", (mp - length).smobbed_copy ());