From 46915663d6b4b156d88d095c9003f8ffddbc6680 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 24 Feb 2004 22:24:52 +0000 Subject: [PATCH] * lily/hyphen-engraver.cc (finalize): suicide unterminated hyphens. * scripts/lilypond-book.py (compose_ly): cleanup relative= option, obey documentation. --- ChangeLog | 7 +++++++ lily/hyphen-engraver.cc | 5 ++++- scripts/lilypond-book.py | 9 ++++++++- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 07ad3e19e2..6882c0fa33 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-02-24 Han-Wen Nienhuys + + * lily/hyphen-engraver.cc (finalize): suicide unterminated hyphens. + + * scripts/lilypond-book.py (compose_ly): cleanup relative= option, + obey documentation. + 2004-02-24 Jan Nieuwenhuizen * scm/output-ps.scm: Resurrect. diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index 16b79b915f..771db2d90d 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -106,7 +106,10 @@ Hyphen_engraver::finalize () completize_hyphen (finished_hyphen_); if (!finished_hyphen_->get_bound (RIGHT)) - finished_hyphen_->warning (_("unterminated hyphen")); + { + finished_hyphen_->warning (_("unterminated hyphen; removing")); + finished_hyphen_->suicide (); + } typeset_grob (finished_hyphen_); finished_hyphen_ =0; } diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index f662987061..0e78510864 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -350,7 +350,14 @@ def compose_ly (code, options): if RELATIVE in override.keys () and override[RELATIVE]: relative = string.atoi (override[RELATIVE]) - relative_quotes = (",,,", ",,", ",", "", "'", "''", "'''")[relative+4] + relative_quotes = '' + + # 1 = central C + if relative < 0: + relative_quotes += ',' * (- relative - 1) + elif relative > 0: + relative_quotes += "'" * relative + program_name = __main__.program_name paper_string = string.join (paper_options, '\n ') % override preamble_string = string.join (preamble_options, '\n ') % override -- 2.39.2