diff options
author | David Kastrup <dak@gnu.org> | 2016-07-10 20:01:48 +0200 |
---|---|---|
committer | David Kastrup <dak@gnu.org> | 2016-07-10 20:01:48 +0200 |
commit | 0f3898aade7077c15adb2b457e6a5e1238939085 (patch) | |
tree | edb1fec21fb0abb2e1fd262e11407e7705d3f42b | |
parent | 90fce106774e91373aba8308f39da486064f4cef (diff) | |
parent | 76dccb496a1ecd4be7767b544114877332a1f1ff (diff) |
Merge branch 'issue4914'
-rw-r--r-- | Documentation/ly-examples/orchestra.ly | 3 | ||||
-rw-r--r-- | Documentation/snippets/engravers-one-by-one.ly | 5 | ||||
-rw-r--r-- | input/regression/spacing-to-empty-barline.ly | 3 | ||||
-rw-r--r-- | lily/output-property-engraver.cc | 22 | ||||
-rw-r--r-- | ly/engraver-init.ly | 9 | ||||
-rw-r--r-- | python/convertrules.py | 6 |
6 files changed, 21 insertions, 27 deletions
diff --git a/Documentation/ly-examples/orchestra.ly b/Documentation/ly-examples/orchestra.ly index 7654521ebb..20dad7f93f 100644 --- a/Documentation/ly-examples/orchestra.ly +++ b/Documentation/ly-examples/orchestra.ly @@ -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" diff --git a/Documentation/snippets/engravers-one-by-one.ly b/Documentation/snippets/engravers-one-by-one.ly index 5d1bcf060c..f9ca655110 100644 --- a/Documentation/snippets/engravers-one-by-one.ly +++ b/Documentation/snippets/engravers-one-by-one.ly @@ -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" diff --git a/input/regression/spacing-to-empty-barline.ly b/input/regression/spacing-to-empty-barline.ly index 16cb6656fb..b35fb67f80 100644 --- a/input/regression/spacing-to-empty-barline.ly +++ b/input/regression/spacing-to-empty-barline.ly @@ -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" diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index 7a0fa2d3c3..370d6e1c1f 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -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 ()); + } } } diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 3637871a66..0b5b8f7f2a 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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" diff --git a/python/convertrules.py b/python/convertrules.py index dbe59faa96..f64312a839 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -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) |