From d7e54bbb63e583e1423803d82c7199e03d6a7e2d Mon Sep 17 00:00:00 2001
From: hanwen <hanwen>
Date: Sun, 23 Feb 2003 11:59:01 +0000
Subject: [PATCH] * lily/percent-repeat-engraver.cc (try_music): add correct
 processing moments for double-measure percents as well.

* input/regression/percent-repeat-skipbars.ly (texidoc): new file
---
 ChangeLog                                   |  5 ++
 input/regression/percent-repeat-skipbars.ly | 16 +++++
 lily/axis-group-engraver.cc                 |  3 +-
 lily/percent-repeat-engraver.cc             | 14 ++--
 lily/stem-engraver.cc                       |  4 +-
 scm/grob-property-description.scm           | 80 +++------------------
 6 files changed, 40 insertions(+), 82 deletions(-)
 create mode 100644 input/regression/percent-repeat-skipbars.ly

diff --git a/ChangeLog b/ChangeLog
index 378da4c359..255c396442 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2003-02-23  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
 
+	* lily/percent-repeat-engraver.cc (try_music): add correct
+	processing moments for double-measure percents as well.
+
+	* input/regression/percent-repeat-skipbars.ly (texidoc): new file
+
 	* lily/lily-guile.cc (ly:dimension?): add dimension as separate
 	grob prop type. 
 
diff --git a/input/regression/percent-repeat-skipbars.ly b/input/regression/percent-repeat-skipbars.ly
new file mode 100644
index 0000000000..0ecf39697c
--- /dev/null
+++ b/input/regression/percent-repeat-skipbars.ly
@@ -0,0 +1,16 @@
+\header {
+texidoc = "Percent repeats are not skipped, even when skipBars is set.  "
+}
+
+
+\include "paper20.ly"
+
+\score {
+     \context Staff <
+	\property Score.skipBars = ##t
+	\notes {
+	\repeat "percent" 2 { g2 a g a }
+	}
+     >
+}
+
diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc
index b9c3ef8741..286d42477b 100644
--- a/lily/axis-group-engraver.cc
+++ b/lily/axis-group-engraver.cc
@@ -155,7 +155,8 @@ Hara_kiri_engraver::acknowledge_grob (Grob_info i)
 {
   Axis_group_engraver::acknowledge_grob (i);
   if (Rhythmic_head::has_interface (i.grob_)
-      || i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface")))
+      || i.grob_->internal_has_interface (ly_symbol2scm ("lyric-syllable-interface"))
+      )
     {
       Hara_kiri_group_spanner::add_interesting_item (staffline_, i.grob_);
     }
diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc
index fd42e56c14..9cf39db4a9 100644
--- a/lily/percent-repeat-engraver.cc
+++ b/lily/percent-repeat-engraver.cc
@@ -120,17 +120,9 @@ Percent_repeat_engraver::try_music (Music * m)
       repeat_ = rp;
 
       
-      Global_translator *global =0;
-      Translator *t = this;
-      do
-	{
-	  t = t->daddy_trans_ ;
-	  global = dynamic_cast<Global_translator*> (t);
-	}
-      while (!global);
-
+      Global_translator *global =top_engraver();
       for (int i = 0; i < count; i++)  
-	global->add_moment_to_process (now + Moment (1+i) * body_length_);
+	global->add_moment_to_process (next_moment_ + Moment (i) * body_length_);
   
       return true;
     }
@@ -170,6 +162,8 @@ Percent_repeat_engraver::process_music ()
 	    top_engraver()->forbid_breaks ();	// guh. Use properties!      
 	}
       next_moment_ = next_moment_ + body_length_;
+
+      top_engraver()->add_moment_to_process (next_moment_);
     }
 }
 
diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc
index c2e2db386e..7535d39162 100644
--- a/lily/stem-engraver.cc
+++ b/lily/stem-engraver.cc
@@ -121,7 +121,9 @@ Stem_engraver::acknowledge_grob (Grob_info i)
 
       if (Stem::duration_log (stem_) != duration_log)
 	{
-	  i.music_cause ()->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 <<  Stem::duration_log (stem_)));
+	  i.music_cause ()->origin ()->warning (_f ("Adding note head to incompatible stem (type = %d)", 1 <<  Stem::duration_log (stem_))
+						+ _f ("Don't you want polyphonic voices instead?")
+						);
 	}
 
       Stem::add_head (stem_,h);
diff --git a/scm/grob-property-description.scm b/scm/grob-property-description.scm
index 97d1a4a377..fa9ff3a7f8 100644
--- a/scm/grob-property-description.scm
+++ b/scm/grob-property-description.scm
@@ -452,63 +452,7 @@ the Nth element of the list gives the amount stem shortening of a note with N fl
 (grob-property-description 'style symbol? "a string determining what style of  glyph is typeset. Valid choices depend on the function that is reading this property. .")
 (grob-property-description 'support-head ly:grob? "the note head at
 one end of the stem.")
-(grob-property-description 'text markup? "
-Scheme markup text.  It is defined as follows:
-
-@example
-text: string | (head? text+)
-head: markup | (markup+)
-markup-item: property | abbrev
-property: (@var{key} . @var{value})
-abbrev: @code{columns lines roman music bold italic named super sub overstrike text}
-        @code{finger volta timesig mmrest mark script large Large dynamic}
-@end example
-
-
-The following abbreviations are currently defined:
-@table @samp
-@item columns
- horizontal mode: set all text on one line (default)
-@item lines
- vertical mode: set every text on new line
-@item roman
- select roman font
-@item music
- select feta font, and lookup by character name
-@item bold
- select bold series
-@item italic
- select italic shape
-@item named
- lookup by character name
-@item text
- plain text lookup (by character value)
-@item super
- superscript
-@item sub
- subscript
-@item overstrike
- the next text or character overstrikes this one
-@item finger
- select fingering number fontstyle
-@item volta
- select volta number fontstyle
-@item timesig
- select time signature number fontstyle
-@item mmrest
- select multi measure rest number fontstyle
-@item mark
- select mark number fontstyle
-@item script
- select scriptsize roman fontstyle
-@item large
- select large roman fontstyle
-@item Large
- select Large roman fontstyle
-@item dynamic
- select dynamics fontstyle
-@end table
-.")
+(grob-property-description 'text markup? "Text markup.  See reference manual for more information.")
 (grob-property-description 'text-start boolean? "Indicator for whether a piano pedal bracket has leading text, such as Ped.")
 (grob-property-description 'thick-thickness number? "thickness, measured in stafflinethickness.")
 (grob-property-description 'thickness number? "thickness, measured in stafflinethickness.")
@@ -534,22 +478,19 @@ Like @code{bracket-visibility}, but for the number.")
 
 (grob-property-description 'break-visibility procedure? "a function that takes the break direction and returns a  cons of booleans containing (TRANSPARENT . EMPTY).
 
-
 Some items need special treatment for line breaking. For example, a
-clef is normally only printed at the start of a line (i.e. after a line
-break).  To model this, `breakable' items (clef, key signature, bar lines,
-etc.) are copied twice. Then we have three versions of each breakable
-item: one version if there is no line break, one version that is printed
-before the line break (at the end of a system), one version that is
-printed after the line break.
+clef is normally only printed at the start of a line (i.e. after a
+line break).  To model this, `breakable' items (clef, key signature,
+bar lines, etc.) are copied twice. Then we have three versions of each
+breakable item: one version if there is no line break, one version
+that is printed before the line break (at the end of a system), one
+version that is printed after the line break.
 
 Whether these versions are visible and take up space, is determined by
 the outcome of the @code{break-visibility}. This grob property is a
-function taking a direction (-1, 0 or 1) as argument. It returns a cons
-of booleans, signifying whether this grob should be transparent and have
-no extent.
-
-")
+function taking a direction (-1, 0 or 1) as argument. It returns a
+cons of booleans, signifying whether this grob should be transparent
+and have no extent.")
 (grob-property-description 'virga boolean? "is this neume a virga?.")
 (grob-property-description 'when ly:moment? "when does this column happen?.")
 (grob-property-description 'word-space ly:dimension? "elongate left by this much (FIXME: cumbersome semantics).")
@@ -583,7 +524,6 @@ columns.
 (grob-property-description 'right-neighbors grob-list? "see left-neighbors")
 (grob-property-description 'left-items grob-list? "")
 (grob-property-description 'right-items grob-list? "")
-
 (grob-property-description 'cause scheme? "Any kind of causation objects (i.e. music, or perhaps translator) that was the cause for this grob.  ")
 (grob-property-description 'font ly:font-metric? "Cached font metric object")
 (grob-property-description 'break-alignment-done boolean? "mark flag to signal we've done alignment already.")
-- 
2.39.5