-ADD_INTERFACE (Spanner,
- "Some objects are horizontally spanned between objects. For\n"
- "example, slur, beam, tie, etc. These grobs form a subtype called\n"
- "@code{Spanner}. All spanners have two span-points (these must be\n"
- "@code{Item} objects), one on the left and one on the right. The left bound is\n"
- "also the X-reference point of the spanner.\n",
+MAKE_SCHEME_CALLBACK (Spanner, kill_zero_spanned_time, 1);
+SCM
+Spanner::kill_zero_spanned_time (SCM grob)
+{
+ Spanner *me = unsmob_spanner (grob);
+ /*
+ Remove the line or hairpin at the start of the line. For
+ piano voice indicators, it makes no sense to have them at
+ the start of the line.
+
+ I'm not sure what the official rules for glissandi are, but
+ usually the 2nd note of the glissando is "exact", so when playing
+ from the start of the line, there is no need to glide.
+
+ From a typographical p.o.v. this makes sense, since the amount of
+ space left of a note at the start of a line is very small.
+
+ --hwn.
+
+ */
+ if (me->get_bound (LEFT)->break_status_dir ())
+ {
+ Interval_t<Moment> moments = me->spanned_time ();
+ moments [LEFT].grace_part_ = 0;
+ if (moments.length () == Moment (0, 0))
+ me->suicide ();
+ }
+
+ return SCM_UNSPECIFIED;
+}
+
+SCM
+Spanner::get_cached_pure_property (SCM sym, int start, int end)
+{
+ // The pure property cache is indexed by (name start . end), where name is
+ // a symbol, and start and end are numbers referring to the starting and
+ // ending column ranks of the current line.
+ if (scm_hash_table_p (pure_property_cache_) == SCM_BOOL_F)
+ return SCM_UNDEFINED;
+
+ SCM key = scm_cons (sym, scm_cons (scm_from_int (start), scm_from_int (end)));
+ return scm_hash_ref (pure_property_cache_, key, SCM_UNDEFINED);
+}