]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'issue4914'
authorDavid Kastrup <dak@gnu.org>
Sun, 10 Jul 2016 18:01:48 +0000 (20:01 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 10 Jul 2016 18:01:48 +0000 (20:01 +0200)
Documentation/ly-examples/orchestra.ly
Documentation/snippets/engravers-one-by-one.ly
input/regression/spacing-to-empty-barline.ly
lily/output-property-engraver.cc
ly/engraver-init.ly
python/convertrules.py

index 7654521ebb718a0915046871c7287da8dae45517..20dad7f93f3396ac0ab3c754b51309fdc96cbd94 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.19.21"
+\version "2.19.46"
 
 \header {
   tagline = ##f
@@ -85,7 +85,6 @@ offCr = {
   \context {
     \type "Engraver_group"
     \name "MarkLine"
-    \consists "Output_property_engraver"
     \consists "Axis_group_engraver"
     \consists "Mark_engraver"
     \consists "Metronome_mark_engraver"
index 5d1bcf060c84c41cd90fa6a226837a686fe30e80..f9ca655110d812d795525ddc9da07ef1a508b992 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.19.7"
+\version "2.19.46"
 
 \header {
   lsrtags = "contexts-and-engravers, specific-notation"
@@ -89,8 +89,6 @@ MyStaff = \context {
   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
 @code{Voice} contexts."
 
-  \consists "Output_property_engraver"
-
   \consists "Font_size_engraver"
 
   \consists "Volta_engraver"
@@ -138,7 +136,6 @@ MyVoice = \context {
   \consists "Font_size_engraver"
 
   % must come before all
-  \consists "Output_property_engraver"
   \consists "Arpeggio_engraver"
   \consists "Multi_measure_rest_engraver"
   \consists "Text_spanner_engraver"
index 16cb6656fbe56cf55ecf97edefed398f8bafb660..b35fb67f80e68ab058e1fd4e507e6899c1c06d97 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.17.30"
+\version "2.19.46"
 
 \header {
   texidoc = "An empty barline does not confuse the spacing engine too much.
@@ -15,7 +15,6 @@ The two scores should look approximately the same."
     \name "Top"
     \alias "Staff"
     \type "Engraver_group"
-    \consists "Output_property_engraver"
     \consists "Bar_engraver"
     \consists "Axis_group_engraver"
 
index 7a0fa2d3c3389484cb94f03c6f798f0a1e6b866c..370d6e1c1f011400f0b8a8763083a0763e1a21f3 100644 (file)
@@ -37,15 +37,12 @@ protected:
   void stop_translation_timestep ();
 };
 
+// We only run this in the Score context, so all events are likely to
+// find a target
 void
 Output_property_engraver::listen_apply_output (Stream_event *ev)
 {
-  /*
-    UGH. Only swallow the output property event in the context
-    it was intended for. This is inelegant but not inefficient.
-  */
-  if (context ()->is_alias (ev->get_property ("context-type")))
-    props_.push_back (ev);
+  props_.push_back (ev);
 }
 
 void
@@ -59,11 +56,16 @@ Output_property_engraver::acknowledge_grob (Grob_info inf)
       if (scm_is_symbol (grob)
           && ly_symbol2string (grob) != inf.grob ()->name ())
         continue;
+      SCM typ = o->get_property ("context-type");
       SCM proc = o->get_property ("procedure");
-      scm_call_3 (proc,
-                 inf.grob ()->self_scm (),
-                 d->self_scm (), 
-                 context ()->self_scm ());
+      for (Context *c = d; c; c = c->get_parent_context ())
+        {
+          if (c->is_alias (typ))
+            scm_call_3 (proc,
+                        inf.grob ()->self_scm (),
+                        d->self_scm (),
+                        c->self_scm ());
+        }
     }
 }
 
index 3637871a66a3c555f37be3f8b0dc5cf2fd01fd30..0b5b8f7f2aca05001672066225e5b62b6f64e884 100644 (file)
@@ -16,7 +16,7 @@
 %%%% You should have received a copy of the GNU General Public License
 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
-\version "2.19.19"
+\version "2.19.46"
 
 \context {
   \name "Global"
@@ -35,7 +35,6 @@
   \description "A context for displaying fret diagrams."
 
   \consists "Fretboard_engraver"
-  \consists "Output_property_engraver"
   \consists "Axis_group_engraver"
   \consists "Separating_line_group_engraver"
   \consists "Font_size_engraver"
@@ -54,7 +53,6 @@
   \type "Engraver_group"
   \name "Staff"
 
-  \consists "Output_property_engraver"
   \consists "Bar_engraver"
   \consists "Pure_from_neighbor_engraver"
   %% Bar_engraver must be first so default bars aren't overwritten
@@ -177,7 +175,6 @@ contained staves are not connected vertically."
   \override Stem.neutral-direction = #UP
   \override Beam.neutral-direction = #UP
 
-  \consists "Output_property_engraver"
   \consists "Font_size_engraver"
   \consists "Separating_line_group_engraver"
   \consists "Dot_column_engraver"
@@ -218,7 +215,6 @@ multiple voices on the same staff."
   \consists "Font_size_engraver"
 
   \consists "Pitched_trill_engraver"
-  \consists "Output_property_engraver"
   \consists "Arpeggio_engraver"
   \consists "Multi_measure_rest_engraver"
   \consists "Text_spanner_engraver"
@@ -371,7 +367,6 @@ together, never separately."
   \override DynamicText.extra-spacing-width = ##f
   \consists "Span_bar_stub_engraver"
   \consists "Span_arpeggio_engraver"
-  \consists "Output_property_engraver"
   systemStartDelimiter = #'SystemStartBracket
   %% explicitly set instrument, so it is not inherited from the parent
   instrumentName = #'()
@@ -433,7 +428,6 @@ it with a different one.  Often used with @code{\\stopStaff} and
   \type "Engraver_group"
   \name "Dynamics"
   \alias "Voice"
-  \consists "Output_property_engraver"
   \consists "Bar_engraver"
   \consists "Piano_pedal_engraver"
   \consists "Script_engraver"
@@ -535,7 +529,6 @@ printing of a single line of lyrics."
                                % \key, \transposition
   \description "Typesets chord names."
 
-  \consists "Output_property_engraver"
   \consists "Separating_line_group_engraver"
   \consists "Chord_name_engraver"
   \consists "Axis_group_engraver"
index dbe59faa9615b426ac7ee4431e378a930471e0b9..f64312a839ce01d3f32d56711502926f172eb442 100644 (file)
@@ -3888,7 +3888,8 @@ def conv (str):
                   repl, str)
     return str
 
-@rule ((2, 19, 46), r"\context ... \modification -> \context ... \with \modification")
+@rule ((2, 19, 46), r"""\context ... \modification -> \context ... \with \modification
+\consists "Output_property_engraver" ->""")
 def conv (str):
     word=r'(?:#?"[^"]*"|\b' + wordsyntax + r'\b)'
     mods = string.join (re.findall ("\n(" + wordsyntax + r")\s*=\s*\\with(?:\s|\\|\{)", str)
@@ -3897,6 +3898,9 @@ def conv (str):
                   + r"(?:new|context)\s*" + word
                   + r"(?:\s*=\s*" + word + r")?)\s*)(\\(?:" + mods + "))",
                   r"\1\\with \2", str)
+
+    str = re.sub (r'\\(consists|remove)\s+"?Output_property_engraver"?\s*',
+                  '', str)
     return str
 
 # Guidelines to write rules (please keep this at the end of this file)