]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/hyphen-engraver.cc (finalize): suicide unterminated hyphens.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 24 Feb 2004 22:24:52 +0000 (22:24 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Tue, 24 Feb 2004 22:24:52 +0000 (22:24 +0000)
* scripts/lilypond-book.py (compose_ly): cleanup relative= option,
obey documentation.

ChangeLog
lily/hyphen-engraver.cc
scripts/lilypond-book.py

index 07ad3e19e261bd0d8c132496abae985622c0b8ae..6882c0fa331c9cf7670f08ea59aea483e72cc662 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-02-24  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/hyphen-engraver.cc (finalize): suicide unterminated hyphens.
+
+       * scripts/lilypond-book.py (compose_ly): cleanup relative= option,
+       obey documentation.
+
 2004-02-24  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/output-ps.scm: Resurrect.
index 16b79b915face4a6c2b88464a2dc24b4800e132e..771db2d90d80b770192b5296257e2f544f2a4705 100644 (file)
@@ -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;
     }
index f6629870619e19ecfa312efbe1a749ba0bc035d4..0e78510864dd63c592cf28c73c6e4e2aab947c75 100644 (file)
@@ -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