From 2d81d74ffe7a2dfe24f655566cb8560f6f567d13 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Reuter?= Date: Tue, 15 Nov 2005 23:21:17 +0000 Subject: [PATCH] * lily/ligature-engraver.cc, lily/include/ligature-engraver.hh, scm/define-context-properties.scm: Maintenance bugfix: make ligature brackets work again by removing obsolete ligature primitive callback push/pop. --- ChangeLog | 7 +++++ lily/include/ligature-engraver.hh | 3 -- lily/ligature-engraver.cc | 49 ++----------------------------- scm/define-context-properties.scm | 1 - 4 files changed, 9 insertions(+), 51 deletions(-) diff --git a/ChangeLog b/ChangeLog index e158173489..84cd1bc3a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-16 Jürgen Reuter + + * lily/ligature-engraver.cc, lily/include/ligature-engraver.hh, + scm/define-context-properties.scm: Maintenance bugfix: make + ligature brackets work again by removing obsolete ligature + primitive callback push/pop. + 2005-11-15 Jan Nieuwenhuizen * stepmake/aclocal.m4 (depth): Explain why absolute directory is diff --git a/lily/include/ligature-engraver.hh b/lily/include/ligature-engraver.hh index d1a12e6be9..aa36a0596d 100644 --- a/lily/include/ligature-engraver.hh +++ b/lily/include/ligature-engraver.hh @@ -47,9 +47,6 @@ private: Moment ligature_start_mom_; Grob *last_bound_; - - void override_stencil_callback (); - void revert_stencil_callback (); }; #endif // LIGATURE_ENGRAVER_HH diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index ce6e8a8c2b..cb04b67abe 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -89,48 +89,6 @@ Ligature_engraver::try_music (Music *m) return false; } -/* - * This method should do something that comes close to the following - * .ly snippet: - * - * \property Voice.NoteHead \override #'print-function = - * < value of noteHeadLigaturePrimitive - * - * TODO: What we are doing here on the c++ level, should actually be - * performed on the SCM level. However, I do not know how to teach - * lilypond to apply an \override and \revert on #'print-function, - * whenever lily encounters a \[ and \] in an .ly file, respectively. - * Also encounter, that lily should not crash if a user erronously - * nests \[ and \]. - */ -void -Ligature_engraver::override_stencil_callback () -{ - execute_pushpop_property (context (), ly_symbol2scm ("NoteHead"), - ly_symbol2scm ("stencil"), - get_property ("noteHeadLigaturePrimitive")); -} - -/* - * This method should do something that comes close to the following - * .ly snippet: - * - * \property Voice.NoteHead \revert #'print-function - * - * TODO: What we are doing here on the c++ level, should actually be - * performed on the SCM level. However, I do not know how to teach - * lilypond to apply an \override and \revert on #'print-function, - * whenever lily encounters a \[ and \] in an .ly file, respectively. - * Also encounter, that lily should not crash if a user erronously - * nests \[ and \]. - */ -void -Ligature_engraver::revert_stencil_callback () -{ - execute_pushpop_property (context (), ly_symbol2scm ("NoteHead"), - ly_symbol2scm ("stencil"), SCM_UNDEFINED); -} - void Ligature_engraver::process_music () { @@ -152,7 +110,6 @@ Ligature_engraver::process_music () finished_ligature_ = ligature_; primitives_.clear (); ligature_ = 0; - revert_stencil_callback (); } last_bound_ = unsmob_grob (get_property ("currentMusicalColumn")); @@ -183,7 +140,6 @@ Ligature_engraver::process_music () // TODO: dump cause into make_item/spanner. // announce_grob (ligature_, events_drul_[START]->self_scm ()); - override_stencil_callback (); } } @@ -237,10 +193,9 @@ Ligature_engraver::acknowledge_note_head (Grob_info info) if (ligature_) { primitives_.push (info); - if (info.grob ()) + if (info.grob () && (brew_ligature_primitive_proc != SCM_EOL)) { - info.grob ()->set_property ("stencil", - brew_ligature_primitive_proc); + info.grob ()->set_property ("stencil", brew_ligature_primitive_proc); } } } diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index aa6f8e7757..deecf7ba7b 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -302,7 +302,6 @@ markup. Called with 2 arguments, event and context.") selects the highest string with a fret at least @code{minimumFret}") (minimumVerticalExtent ,number-pair? "minimum vertical extent, same format as @var{verticalExtent}") - (noteHeadLigaturePrimitive ,procedure? "Callback for generating stencil of ligature.") (ottavation ,string? "If set, the text for an ottava spanner. Changing this creates a new text spanner. ") (pedalSustainStrings ,list? "List of string to print for -- 2.39.5