]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into lilypond/translation
authorFrancisco Vila <francisco.vila@hispalinux.es>
Wed, 21 Sep 2011 11:42:27 +0000 (13:42 +0200)
committerFrancisco Vila <francisco.vila@hispalinux.es>
Wed, 21 Sep 2011 11:42:27 +0000 (13:42 +0200)
25 files changed:
Documentation/de/notation/vocal.itely
Documentation/es/notation/vocal.itely
Documentation/fr/notation/input.itely
Documentation/fr/notation/vocal.itely
Documentation/notation/vocal.itely
Documentation/web/news-front.itexi
Documentation/web/news.itexi
VERSION
input/regression/header-cyclic-reference.ly [new file with mode: 0644]
input/regression/markup-cyclic-reference.ly [new file with mode: 0644]
input/regression/markup-depth-non-terminating.ly [new file with mode: 0644]
lily/instrument-name-engraver.cc
lily/paper-column-engraver.cc
lily/parser.yy
lily/stem.cc
lily/text-interface.cc
make/doc-i18n-root-vars.make
mf/feta-ties.mf
mf/parmesan-noteheads.mf
scm/backend-library.scm
scm/define-markup-commands.scm
scm/lily.scm
scm/music-functions.scm
scm/ps-to-png.scm
stepmake/stepmake/texinfo-vars.make

index 1e46e3cf716544787a144d119033de35d3c7affb..976728ea466d5de35cdad85b4a722121e20264f5 100644 (file)
@@ -629,11 +629,11 @@ gesetzt werden.
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index ab4fe58519ebc23dd5a72b516eefdf0be85db333..f96e4daed5fc2e8cb8eb89a27d796539821645b6 100644 (file)
@@ -644,11 +644,11 @@ texto.
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index fa6b6fd95cc086a411ede61c32f0367f088c7aa5..f68687a2740cbf68059f920602c23535b3cfac41 100644 (file)
@@ -1,7 +1,7 @@
 @c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
 
 @ignore
-    Translation of GIT committish: d0c96d3f0b1dca7df98ef5586059965dd46ab16f
+    Translation of GIT committish: 3930746d3e6cab846a02332c39510c48027c6006
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  For details, see the Contributors'
@@ -2287,7 +2287,7 @@ les changements de tempo indiqués par un @code{\tempo}@tie{};
 les paroles.
 @end itemize
 
-Si vous utilisez @ref{Le scrip Articulate}, d'autres éléments seront
+Si vous utilisez @ref{Le script Articulate}, d'autres éléments seront
 alors inclus@tie{}:
 
 @itemize
@@ -2303,7 +2303,7 @@ alors inclus@tie{}:
 @c TODO index as above
 
 LilyPond ne peut générer d'événement MIDI pour les éléments
-suivant, sauf à utiliser @ref{Le scrip Articulate}@tie{}:
+suivant, sauf à utiliser @ref{Le script Articulate}@tie{}:
 
 @itemize
 @item
index 4aa8fab2783e8ea023a4f7671ff528cea5742d80..2b5b4351f7ba587ac24c2342858689b4138a39e1 100644 (file)
@@ -615,11 +615,11 @@ mettre entre guillemets, soit utiliser le caractère souligné
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index a04a8e6ede18177ca332210d899341beda7e2f80..70f7c929868bfc80aa99682372e402de31167879 100644 (file)
@@ -613,11 +613,11 @@ the tilde symbol (@code{~}) to get a lyric tie.
 
 @lilypond[quote,ragged-right,verbatim]
 {
-  \time 3/4
-  \relative c' { c2 e4 g2 e4 }
-  \addlyrics { gran -- de_a -- mi -- go }
-  \addlyrics { pu -- "ro y ho" -- nes -- to }
-  \addlyrics { pu -- ro~y~ho -- nes -- to }
+  \relative c'' { \autoBeamOff
+    r8 b c fis, fis c' b e, }
+  \addlyrics { Che_in ques -- ta_e_in quel -- l'al -- tr'on -- da }
+  \addlyrics { "Che in" ques -- "ta e in" quel -- l'al -- tr'on -- da }
+  \addlyrics { Che~in ques -- ta~e~in quel -- l'al -- tr'on -- da }
 }
 @end lilypond
 
index 55d675bbb3f4e89dd9b88600509aa51019b3b430..a6712fc63af827f33b5ca3864f83ee723727943f 100644 (file)
@@ -9,15 +9,18 @@
 @c used for news about the upcoming release; see CG 10.2
 
 @newsItem
-@subsubheading LilyPond 2.15.12 released!  @emph{September 17, 2011}
+@subsubheading Release candidate 2 of 2.16 - LilyPond 2.15.12 released!  @emph{Aug 20, 2011}
 
-We are happy to announce the release of LilyPond 2.15.12.  This
-release contains the usual number of bugfixes.
+LilyPond 2.15.12 is out; this is the second release candidate of
+the upcoming 2.16 stable release.  All users are invited to
+experiment with this version.  New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
 
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.  Please
-note that due to the possibility of a few Critical bugs, this is
-not the next release candidate.
+There are no known Critical issues with this release.  If no
+Critical bugs are found, then the official 2.16.0 release will be
+on 27 Sep Aug 2011.  If you discover any problems, please send us
+@ref{Bug reports}.
 
 @newsEnd
 
@@ -36,50 +39,4 @@ not the next release candidate.
 @newsEnd
 
 
-@newsItem
-@subsubheading LilyPond 2.15.10 released!  @emph{September 6, 2011}
-
-We are happy to announce the release of LilyPond 2.15.10.  This
-release contains the usual number of bugfixes.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.  Please
-note that due to a few outstanding Critical bugs, this is not the
-next release candidate.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading LilyPond 2.15.9 released!  @emph{August 30, 2011}
-
-We are happy to announce the release of LilyPond 2.15.9.  This
-release contains the usual number of bugfixes, and also adds
-support for MacOS X 10.7.
-
-It is strongly recommended that normal users do @strong{not} use
-this release, and instead use the stable 2.14 version.  Please
-note that due to a few outstanding Critical bugs, this is not the
-next release candidate.
-
-@newsEnd
-
-
-@newsItem
-@subsubheading Release candidate 1 of 2.16 - LilyPond 2.15.8 released!  @emph{Aug 01, 2011}
-
-LilyPond 2.15.8 is out; this is the first release candidate of
-the upcoming 2.16 stable release.  All users are invited to
-experiment with this version.  New features since 2.14.2 are
-listed in the @qq{Changes} manual on the website section about
-@ref{Development}.
-
-There are no known Critical issues with this release.  If no
-Critical bugs are found, then the official 2.16.0 release will be
-on 08 Aug 2011.  If you discover any problems, please send us
-@ref{Bug reports}.
-
-@newsEnd
-
-
 
index f2d2396dc2fd9ff10bf233d489cf09e230f7f08f..dd8e3a5bd90a52ad4e3e885ad1d24fa133228c09 100644 (file)
@@ -26,6 +26,52 @@ NOTE:
   * don't duplicate entries from news-front.itexi
 @end ignore
 
+@newsItem
+@subsubheading LilyPond 2.15.10 released!  @emph{September 6, 2011}
+
+We are happy to announce the release of LilyPond 2.15.10.  This
+release contains the usual number of bugfixes.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.  Please
+note that due to a few outstanding Critical bugs, this is not the
+next release candidate.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading LilyPond 2.15.9 released!  @emph{August 30, 2011}
+
+We are happy to announce the release of LilyPond 2.15.9.  This
+release contains the usual number of bugfixes, and also adds
+support for MacOS X 10.7.
+
+It is strongly recommended that normal users do @strong{not} use
+this release, and instead use the stable 2.14 version.  Please
+note that due to a few outstanding Critical bugs, this is not the
+next release candidate.
+
+@newsEnd
+
+
+@newsItem
+@subsubheading Release candidate 1 of 2.16 - LilyPond 2.15.8 released!  @emph{Aug 01, 2011}
+
+LilyPond 2.15.8 is out; this is the first release candidate of
+the upcoming 2.16 stable release.  All users are invited to
+experiment with this version.  New features since 2.14.2 are
+listed in the @qq{Changes} manual on the website section about
+@ref{Development}.
+
+There are no known Critical issues with this release.  If no
+Critical bugs are found, then the official 2.16.0 release will be
+on 08 Aug 2011.  If you discover any problems, please send us
+@ref{Bug reports}.
+
+@newsEnd
+
+
 @newsItem
 @subsubheading LilyPond 2.15.7 released!  @emph{July 29, 2011}
 
diff --git a/VERSION b/VERSION
index e6907fbb3b04630e31603270013cacd757929a90..39deb85e8c75d241b0a4bf76c54a29953e828445 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=15
-PATCH_LEVEL=12
+PATCH_LEVEL=13
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.14.2
-VERSION_DEVEL=2.15.11
+VERSION_DEVEL=2.15.12
diff --git a/input/regression/header-cyclic-reference.ly b/input/regression/header-cyclic-reference.ly
new file mode 100644 (file)
index 0000000..03bd5c3
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.15.11"
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+  texidoc = "Cyclic references in header fields should cause a warning, but
+not crash LilyPond with an endless loop"
+
+  title = \markup {Cyclic reference to \fromproperty #'header:title }
+
+  composer = \markup {Cyclic reference to \fromproperty #'header:temp }
+  temp = \markup {Cyclic reference to \fromproperty #'header:composer }
+}
+\score {
+  { c' d' e' f' }
+}
diff --git a/input/regression/markup-cyclic-reference.ly b/input/regression/markup-cyclic-reference.ly
new file mode 100644 (file)
index 0000000..f4495db
--- /dev/null
@@ -0,0 +1,24 @@
+\version "2.15.11"
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+  texidoc = "Cyclic markup definitions should cause a warning, but
+not crash LilyPond with an endless loop"
+}
+
+% A simple markup function that calls itself in a loop.
+#(define-markup-command (cycle layout props m)
+  (markup?)
+  (interpret-markup layout props (make-cycle-markup m)))
+
+% Two simple markup functions that call each other in a loop.
+#(define-markup-command (cycleI layout props m)
+  (markup?)
+  (interpret-markup layout props (make-cycleII-markup m)))
+#(define-markup-command (cycleII layout props m)
+  (markup?)
+  (interpret-markup layout props (make-cycleI-markup m)))
+
+
+\markup { \cycle "a" }
+\markup { \cycleI "a" }
diff --git a/input/regression/markup-depth-non-terminating.ly b/input/regression/markup-depth-non-terminating.ly
new file mode 100644 (file)
index 0000000..52e0f70
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.15.12"
+#(ly:set-option 'warning-as-error #f)
+
+\header {
+  texidoc = "Markups have a maximum depth to prevent non-termination."
+
+}
+
+% A simple markup function that calls itself and increases its argument, so
+% it will grow forever, unless we terminate it.
+#(define-markup-command (recursive-explosion layout props nr)
+  (number?)
+  (interpret-markup layout props (make-recursive-explosion-markup (+ nr 1))))
+
+\markup { Test: \recursive-explosion #1 }
index c453e95411053eed99d8492a56a2b1a90843565b..cfeed05d5362dce697de93d8d0e619ecc54d47ee 100644 (file)
@@ -40,6 +40,7 @@ protected:
   SCM short_text_;
 
   vector<Grob *> axis_groups_;
+  vector<Grob *> backup_axis_groups_;
 
   virtual void finalize ();
   DECLARE_ACKNOWLEDGER (axis_group);
@@ -126,7 +127,6 @@ Instrument_name_engraver::acknowledge_axis_group (Grob_info info)
 {
   if (dynamic_cast<Spanner *> (info.grob ())
       && Axis_group_interface::has_axis (info.grob (), Y_AXIS)
-      && Page_layout_problem::is_spaceable (info.grob ())
 
       /* ugh. */
 
@@ -135,7 +135,13 @@ Instrument_name_engraver::acknowledge_axis_group (Grob_info info)
       && !info.grob ()->internal_has_interface (ly_symbol2scm ("volta-interface"))
       && (!Align_interface::has_interface (info.grob ())))
     {
-      axis_groups_.push_back (info.grob ());
+      if (Page_layout_problem::is_spaceable (info.grob ()))
+        axis_groups_.push_back (info.grob ());
+      else
+        // By default, don't include non-spaceable staves in the
+        // support of an instrument name.  However, if the only staves
+        // are non-spaceable, we'll fall back to using them.
+        backup_axis_groups_.push_back (info.grob ());
     }
 }
 
@@ -149,6 +155,9 @@ Instrument_name_engraver::finalize ()
 void
 Instrument_name_engraver::stop_spanner ()
 {
+  if (axis_groups_.empty ())
+    axis_groups_ = backup_axis_groups_;
+
   for (vsize i = 0; i < axis_groups_.size (); i++)
     Pointer_group_interface::add_grob (text_spanner_,
                                        ly_symbol2scm ("elements"),
index 3d4ee9fd95c8c59ed68f9893d38b2a8214a70cae..c447db179002323678cee65f5717d9988de83395 100644 (file)
@@ -273,7 +273,6 @@ Paper_column_engraver::stop_translation_timestep ()
   context ()->get_score_context ()->unset_property (ly_symbol2scm ("forbidBreak"));
 
   first_ = false;
-  break_events_.clear ();
   label_events_.clear ();
 
   SCM mpos = get_property ("measurePosition");
@@ -292,6 +291,7 @@ Paper_column_engraver::stop_translation_timestep ()
 void
 Paper_column_engraver::start_translation_timestep ()
 {
+  break_events_.clear ();
   if (!first_ && !to_boolean (get_property ("skipTypesetting")))
     {
       make_columns ();
index 02c99e2f42e8f4eb7cf3283a764369ccac3770d7..82df956fa830db25b41bbcc3d9fcec7a56b378ea 100644 (file)
 deleting them.  Let's hope that a stack overflow doesnt trigger a move
 of the parse stack onto the heap. */
 
-%left PREC_TOP
-%left ADDLYRICS
 %left PREC_BOT
+%nonassoc REPEAT
+%nonassoc ALTERNATIVE
+%left ADDLYRICS
+%left PREC_TOP
 
-%expect 1
 
-/* One shift/reduce problem
+/* The above precedences tackle the shift/reduce problem
 
 1.  \repeat
        \repeat .. \alternative
@@ -327,8 +328,8 @@ If we give names, Bison complains.
 /* Music */
 %type <scm> composite_music
 %type <scm> grouped_music_list
+%type <scm> braced_music_list
 %type <scm> closed_music
-%type <scm> open_music
 %type <scm> music
 %type <scm> prefix_composite_music
 %type <scm> repeated_music
@@ -365,7 +366,6 @@ If we give names, Bison complains.
 %type <outputdef> output_def
 %type <outputdef> paper_block
 
-%type <scm> alternative_music
 %type <scm> generic_prefix_music_scm
 %type <scm> music_list
 %type <scm> absolute_pitch
@@ -388,18 +388,19 @@ If we give names, Bison complains.
 %type <scm> context_prop_spec
 %type <scm> direction_less_char
 %type <scm> duration_length
-%type <scm> closed_embedded_scm
 %type <scm> embedded_scm
+%type <scm> embedded_scm_bare
+%type <scm> embedded_scm_closed
+%type <scm> embedded_scm_chord_body
+%type <scm> embedded_scm_event
 %type <scm> figure_list
 %type <scm> figure_spec
 %type <scm> fraction
 %type <scm> full_markup
 %type <scm> full_markup_list
-%type <scm> function_scm_argument
 %type <scm> function_arglist
-%type <scm> function_arglist_nonmusic_last
-%type <scm> closed_function_arglist
-%type <scm> open_function_arglist
+%type <scm> function_arglist_bare
+%type <scm> function_arglist_closed
 %type <scm> identifier_init
 %type <scm> lilypond
 %type <scm> lilypond_header
@@ -412,7 +413,6 @@ If we give names, Bison complains.
 %type <scm> markup_composed_list
 %type <scm> markup_command_list
 %type <scm> markup_command_list_arguments
-%type <scm> closed_markup_command_list_arguments
 %type <scm> markup_command_basic_arguments
 %type <scm> markup_head_1_item
 %type <scm> markup_head_1_list
@@ -440,9 +440,10 @@ If we give names, Bison complains.
 %type <scm> property_operation
 %type <scm> property_path property_path_revved
 %type <scm> scalar
-%type <scm> closed_scalar
-%type <scm> open_scm_function_call
-%type <scm> closed_scm_function_call
+%type <scm> scalar_bare
+%type <scm> scalar_closed
+%type <scm> scm_function_call
+%type <scm> scm_function_call_closed
 %type <scm> script_abbreviation
 %type <scm> simple_chord_elements
 %type <scm> simple_markup
@@ -545,28 +546,20 @@ toplevel_expression:
        }
        ;
 
-closed_embedded_scm:
+embedded_scm_bare:
        SCM_TOKEN
        | SCM_IDENTIFIER
-       | closed_scm_function_call
        ;
 
-embedded_scm:
-       closed_embedded_scm
-       | open_scm_function_call
-       ;
+/* The generic version may end in music, or not */
 
-closed_scm_function_call:
-       SCM_FUNCTION closed_function_arglist
-       {
-               $$ = run_music_function (PARSER, @$,
-                                        $1, $2);
-       }
+embedded_scm:
+       embedded_scm_bare
+       | scm_function_call
        ;
 
-open_scm_function_call:
-       SCM_FUNCTION open_function_arglist
-       {
+scm_function_call:
+       SCM_FUNCTION function_arglist {
                $$ = run_music_function (PARSER, @$,
                                         $1, $2);
        }
@@ -791,6 +784,7 @@ book_body:
        | book_body lilypond_header {
                $$->header_ = $2;
        }
+       | book_body embedded_scm { }
        | book_body error {
                $$->paper_ = 0;
                $$->scores_ = SCM_EOL;
@@ -843,6 +837,7 @@ bookpart_body:
        | bookpart_body lilypond_header {
                $$->header_ = $2;
        }
+       | bookpart_body embedded_scm { }
        | bookpart_body error {
                $$->paper_ = 0;
                $$->scores_ = SCM_EOL;
@@ -974,10 +969,10 @@ tempo_event:
        TEMPO steno_duration '=' tempo_range    {
                $$ = MAKE_SYNTAX ("tempo", @$, SCM_EOL, $2, $4);
        }
-       | TEMPO closed_scalar steno_duration '=' tempo_range    {
+       | TEMPO scalar_closed steno_duration '=' tempo_range    {
                $$ = MAKE_SYNTAX ("tempo", @$, $2, $3, $5);
        }
-       | TEMPO closed_scalar {
+       | TEMPO scalar {
                $$ = MAKE_SYNTAX ("tempo", @$, $2);
        }
        ;
@@ -1004,41 +999,43 @@ music_list:
        }
        ;
 
+braced_music_list:
+       '{' music_list '}'
+       {
+               $$ = scm_reverse_x ($2, SCM_EOL);
+       }
+       ;
+
 music:
        simple_music
        | composite_music
        | MUSIC_IDENTIFIER
        ;
 
-alternative_music:
-       /* empty */ {
-               $$ = SCM_EOL;
-       }
-       | ALTERNATIVE '{' music_list '}' {
-               $$ = scm_reverse_x ($3, SCM_EOL);
-       }
-       ;
-
 
 repeated_music:
-       REPEAT simple_string unsigned_number music alternative_music
+       REPEAT simple_string unsigned_number music
+       {
+               $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, SCM_EOL);
+       }
+       | REPEAT simple_string unsigned_number music ALTERNATIVE braced_music_list
        {
-               $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $5);
+               $$ = MAKE_SYNTAX ("repeat", @$, $2, $3, $4, $6);
        }
        ;
 
 sequential_music:
-       SEQUENTIAL '{' music_list '}'           {
-               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($3, SCM_EOL));
+       SEQUENTIAL braced_music_list {
+               $$ = MAKE_SYNTAX ("sequential-music", @$, $2);
        }
-       | '{' music_list '}'            {
-               $$ = MAKE_SYNTAX ("sequential-music", @$, scm_reverse_x ($2, SCM_EOL));
+       | braced_music_list {
+               $$ = MAKE_SYNTAX ("sequential-music", @$, $1);
        }
        ;
 
 simultaneous_music:
-       SIMULTANEOUS '{' music_list '}'{
-               $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($3, SCM_EOL));
+       SIMULTANEOUS braced_music_list {
+               $$ = MAKE_SYNTAX ("simultaneous-music", @$, $2);
        }
        | DOUBLE_ANGLE_OPEN music_list DOUBLE_ANGLE_CLOSE       {
                $$ = MAKE_SYNTAX ("simultaneous-music", @$, scm_reverse_x ($2, SCM_EOL));
@@ -1102,52 +1099,49 @@ closed_music:
        | grouped_music_list
        ;
 
-/* Music that potentially accepts additional events or durations */
-open_music:
-       simple_music
-       | prefix_composite_music
-       ;
 grouped_music_list:
        simultaneous_music              { $$ = $1; }
        | sequential_music              { $$ = $1; }
        ;
 
-function_scm_argument:
-       closed_embedded_scm
-       | simple_string
-       ;
-
 /* An argument list. If a function \foo expects scm scm music, then the lexer expands \foo into the token sequence:
  MUSIC_FUNCTION EXPECT_MUSIC EXPECT_SCM EXPECT_SCM EXPECT_NO_MORE_ARGS
 and this rule returns the reversed list of arguments. */
 
 
 function_arglist:
-       closed_function_arglist
-       | open_function_arglist
+       function_arglist_bare
+       | EXPECT_MUSIC function_arglist music {
+               $$ = scm_cons ($3, $2);
+       }
+       | EXPECT_SCM function_arglist embedded_scm {
+               $$ = scm_cons ($3, $2);
+       }
        ;
 
-open_function_arglist:
-       EXPECT_MUSIC function_arglist open_music {
+function_arglist_closed:
+       function_arglist_bare
+       | EXPECT_MUSIC function_arglist closed_music {
                $$ = scm_cons ($3, $2);
        }
-       | EXPECT_SCM function_arglist open_scm_function_call {
+       | EXPECT_SCM function_arglist embedded_scm_closed {
                $$ = scm_cons ($3, $2);
        }
        ;
 
-/* a closed argument list is one that does not end in a music
-   expression that could still take a duration or event */
+embedded_scm_closed:
+       embedded_scm_bare
+       | scm_function_call_closed
+       ;
 
-closed_function_arglist:
-       function_arglist_nonmusic_last
-       | EXPECT_MUSIC function_arglist closed_music {
-               $$ = scm_cons ($3, $2);
-               }
+scm_function_call_closed:
+       SCM_FUNCTION function_arglist_closed {
+               $$ = run_music_function (PARSER, @$,
+                                        $1, $2);
+       }
        ;
 
-function_arglist_nonmusic_last:
+function_arglist_bare:
        EXPECT_NO_MORE_ARGS {
                /* This is for 0-ary functions, so they don't need to
                   read a lookahead token */
@@ -1162,11 +1156,11 @@ function_arglist_nonmusic_last:
        | EXPECT_PITCH function_arglist pitch_also_in_chords {
                $$ = scm_cons ($3, $2);
        }
-       | EXPECT_DURATION closed_function_arglist duration_length {
+       | EXPECT_DURATION function_arglist_closed duration_length {
                $$ = scm_cons ($3, $2);
        }
-       | EXPECT_SCM function_arglist function_scm_argument {
-               $$ = scm_cons ($3, $2);
+       | EXPECT_SCM function_arglist simple_string {
+               $$ = scm_cons ($3, $2);
        }
        ;
 
@@ -1342,10 +1336,10 @@ context_change:
 
 
 property_path_revved:
-       closed_embedded_scm {
+       embedded_scm_closed {
                $$ = scm_cons ($1, SCM_EOL);
        }
-       | property_path_revved closed_embedded_scm {
+       | property_path_revved embedded_scm_closed {
                $$ = scm_cons ($2, $1);
        }
        ;
@@ -1483,7 +1477,8 @@ simple_string: STRING {
        }
        ;
 
-closed_scalar: string {
+scalar_bare:
+       string {
                $$ = $1;
        }
        | lyric_element {
@@ -1492,7 +1487,7 @@ closed_scalar: string {
        | bare_number {
                $$ = $1;
        }
-        | closed_embedded_scm {
+        | embedded_scm_bare {
                $$ = $1;
        }
        | full_markup {
@@ -1500,10 +1495,17 @@ closed_scalar: string {
        }
        ;
 
-scalar: closed_scalar
-       | open_scm_function_call
+scalar:
+       scalar_bare |
+       scm_function_call
        ;
 
+scalar_closed:
+       scalar_bare |
+       scm_function_call_closed
+       ;
+
+
 event_chord:
        /* TODO: Create a special case that avoids the creation of
           EventChords around simple_elements that have no post_events?
@@ -1624,10 +1626,21 @@ chord_body_element:
  */
 
 music_function_chord_body_arglist:
-       function_arglist_nonmusic_last
+       function_arglist_bare
        | EXPECT_MUSIC music_function_chord_body_arglist chord_body_element {
                $$ = scm_cons ($3, $2);
        }
+       | EXPECT_SCM function_arglist embedded_scm_chord_body {
+               $$ = scm_cons ($3, $2);
+       }
+       ;
+
+embedded_scm_chord_body:
+       embedded_scm_bare
+       | SCM_FUNCTION music_function_chord_body_arglist {
+               $$ = run_music_function (PARSER, @$,
+                                        $1, $2);
+       }
        ;
 
 music_function_chord_body:
@@ -1643,10 +1656,21 @@ music_function_chord_body:
  * refrain from doing so.
  */
 music_function_event_arglist:
-       function_arglist_nonmusic_last
+       function_arglist_bare
        | EXPECT_MUSIC music_function_event_arglist post_event {
                $$ = scm_cons ($3, $2);
        }
+       | EXPECT_SCM function_arglist embedded_scm_event {
+               $$ = scm_cons ($3, $2);
+       }
+       ;
+
+embedded_scm_event:
+       embedded_scm_bare
+       | SCM_FUNCTION music_function_event_arglist {
+               $$ = run_music_function (PARSER, @$,
+                                        $1, $2);
+       }
        ;
 
 music_function_event:
@@ -2522,7 +2546,7 @@ markup_braced_list_body:
        ;
 
 markup_command_list:
-       MARKUP_LIST_FUNCTION closed_markup_command_list_arguments {
+       MARKUP_LIST_FUNCTION markup_command_list_arguments {
          $$ = scm_cons ($1, scm_reverse_x($2, SCM_EOL));
        }
        ;
@@ -2531,7 +2555,7 @@ markup_command_basic_arguments:
        EXPECT_MARKUP_LIST markup_command_list_arguments markup_list {
          $$ = scm_cons ($3, $2);
        }
-       | EXPECT_SCM markup_command_list_arguments closed_embedded_scm {
+       | EXPECT_SCM markup_command_list_arguments embedded_scm_closed {
          $$ = scm_cons ($3, $2);
        }
        | EXPECT_NO_MORE_ARGS {
@@ -2539,21 +2563,13 @@ markup_command_basic_arguments:
        }
        ;
 
-closed_markup_command_list_arguments:
+markup_command_list_arguments:
        markup_command_basic_arguments { $$ = $1; }
        | EXPECT_MARKUP markup_command_list_arguments markup {
          $$ = scm_cons ($3, $2);
        }
        ;
 
-markup_command_list_arguments:
-       closed_markup_command_list_arguments
-       | EXPECT_SCM markup_command_list_arguments open_scm_function_call
-       {
-         $$ = scm_cons ($3, $2);
-       }
-       ;
-
 markup_head_1_item:
        MARKUP_FUNCTION EXPECT_MARKUP markup_command_list_arguments {
          $$ = scm_cons ($1, scm_reverse_x ($3, SCM_EOL));
index 6575914789de9e84c7e9164592d82eda600b6319..f6bedcfd95461992e1e2498b34b055c8e1c0a0fb 100644 (file)
@@ -988,7 +988,7 @@ Stem::calc_stem_info (SCM smob)
 
   Also, not for knees.  Seems to be a good thing. */
   bool no_extend = to_boolean (me->get_property ("no-stem-extend"));
-  bool is_knee = to_boolean (beam->get_property ("knee"));
+  bool is_knee = Beam::is_knee (beam);
   if (!no_extend && !is_knee)
     {
       /* Highest beam of (UP) beam must never be lower than middle
index 8071df3cb856428af7aacac5aaa87028f9fecbb8..232d9c3824a80bd36420c7c84dd9c07efd654ed8 100644 (file)
@@ -28,6 +28,7 @@
 #include "modified-font-metric.hh"
 #include "output-def.hh"
 #include "pango-font.hh"
+#include "program-option.hh"
 #include "international.hh"
 #include "warn.hh"
 
@@ -101,7 +102,40 @@ Text_interface::interpret_markup (SCM layout_smob, SCM props, SCM markup)
       if (!is_markup (markup))
         programming_error ("markup head has no markup signature");
 
-      return scm_apply_2 (func, layout_smob, props, args);
+      /* Use a hare/tortoise algorithm to detect whether we are in a cycle,
+       * i.e. whether we have already encountered the same markup in the
+       * current branch of the markup tree structure. */
+      static vector<SCM> encountered_markups;
+      size_t depth = encountered_markups.size ();
+      if (depth > 0)
+        {
+          int slow = depth / 2;
+          if (ly_is_equal (encountered_markups[slow], markup))
+            {
+              string name = ly_symbol2string (scm_procedure_name (func));
+              // TODO: Also print the arguments of the markup!
+              non_fatal_error (_f("Cyclic markup detected: %s", name));
+              return Stencil().smobbed_copy ();
+            }
+        }
+
+      /* Check for non-terminating markups, e.g. recursive calls with
+       * changing arguments */
+      SCM opt_depth = ly_get_option (ly_symbol2scm ("max-markup-depth"));
+      size_t max_depth = robust_scm2int(opt_depth, 1024);
+      if (depth > max_depth)
+        {
+          string name = ly_symbol2string (scm_procedure_name (func));
+          // TODO: Also print the arguments of the markup!
+          non_fatal_error (_f("Markup depth exceeds maximal value of %d; "
+                              "Markup: %s", max_depth, name.c_str ()));
+          return Stencil().smobbed_copy ();
+        }
+
+      encountered_markups.push_back (markup);
+      SCM retval = scm_apply_2 (func, layout_smob, props, args);
+      encountered_markups.pop_back ();
+      return retval;
     }
   else
     {
index e6449d6fb53362c62eea457eee6010a1593a8d5f..9ba98580c38694863f99cd039fb1744aae31a2bd 100644 (file)
@@ -40,7 +40,7 @@ MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 # FIXME: duplicated in stepake/texinfo-vars.make make/doc-i18n-root-vars.make
 XREF_MAPS_DIR=$(top-build-dir)/$(outdir)/xref-maps
 XREF_MAPS_FILES=$(TEXINFO_MANUALS:%=$(XREF_MAPS_DIR)/%.$(ISOLANG).xref-map)
-XREF_MAP_FLAGS += -I $(outdir) -I$(src-dir)
+XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir) $(DOCUMENTATION_INCLUDES)
 
 WEB_MANUALS=web
 
index 4378d576d85b1b08c7d3629141eff4bf320ca3c0..fc0ccb14a4a47ff795e120039de4d4b8c037f893 100644 (file)
 
 fet_begingroup ("ties");
 
-fet_beginchar ("lyric tie", "lyric");
-       save padding;
+save min_width, max_width, min_height, max_height, thin, thick;
 
-       padding := .4 staff_space;
+min_width:= .5 staff_space#;
+max_width:= 5 staff_space#;
+min_height := .2 staff_space#;
+max_height := .4 staff_space#;
+thin := 1.2 linethickness;
+thick := 2 linethickness;
+
+def draw_lyric_tie (expr width_sharp) =
+       save padding, angularity, width, height, depth;
+
+       padding# := .4 staff_space#;
+       angularity := 2.5;
+       width# := max (min (width_sharp, max_width), min_width);
+       height# := (max (width# - min_width, 0) / (max_width - min_width))
+                  [min_height, max_height];
+       depth# := padding# + height#;
 
        set_char_box (0, 0,
-               .7 staff_space#, 0);
+               depth#, 0);
+
+       define_pixels (width, padding);
 
-       z1 = (-staff_space, -padding);
+       z1 = (-width / 2, -padding);
        z2 = (0, -d);
-       z3 = (staff_space, -padding);
+       z3 = (width / 2, -padding);
 
-       penpos1 (1.2 linethickness, 50);
-       penpos2 (2 linethickness, 90);
-       penpos3 (1.2 linethickness, 130);
+       penpos1 (thin, angularity * angle (z2 - z1) + 90);
+       penpos2 (thick, 90);
+       penpos3 (thin, angularity * angle (z3 - z2) + 90);
 
        fill z2l
                .. simple_serif (z3l, z3r, 90)
@@ -41,6 +57,14 @@ fet_beginchar ("lyric tie", "lyric");
                .. cycle;
 
        penlabels (1, 2, 3);
+enddef;
+
+fet_beginchar ("Short lyric tie", "lyric.short");
+       draw_lyric_tie (1.25 staff_space#);
+fet_endchar;
+
+fet_beginchar ("Default lyric tie", "lyric.default");
+       draw_lyric_tie (1.75 staff_space#);
 fet_endchar;
 
 fet_endgroup ("ties");
index c1b6e1d53a7e84ac473e9eb6d672c5123764dc6b..f496c03c72f278a7d5dd16d0f9c49eebfcab2914 100644 (file)
@@ -167,8 +167,8 @@ enddef;
 
 
 def draw_neomensural_black_head (expr wid, height) =
-       save head_height, head_width, stem_width,
-                        ne, nw, ne_dist, nw_dist, penthickness;
+       save head_height, head_width, stem_width;
+       save ne, nw, ne_dist, nw_dist, penthickness;
        pair ne, nw, ne_dist, nw_dist;
 
        penthickness# = linethickness#;
@@ -262,8 +262,9 @@ enddef;
 % (ze is wel breed)
 %
 
-save nm_maxima_width, nm_longa_width, nm_brevis_width,
-                nm_holeheight, nm_red_holeheight;
+save nm_maxima_width, nm_longa_width, nm_brevis_width;
+save nm_holeheight, nm_red_holeheight;
+
 nm_maxima_width := 2.6 staff_space#;
 nm_longa_width := 2 staff_space#;
 nm_brevis_width := nm_longa_width;
index b58d8aca89ef4382f967463f82e5f67366597799..86224f337c0eaa9607094442b3ef712e175f5766 100644 (file)
@@ -28,8 +28,7 @@
   (let ((status (apply ly:spawn command)))
     (if (> status 0)
        (begin
-         (ly:message (_ "`~a' failed (~a)") command status)
-         (ly:progress "\n")
+         (ly:warning (_ "`~a' failed (~a)\n") command status)
          ;; hmmm.  what's the best failure option? 
          (throw 'ly-file-failed)))))
 
@@ -88,8 +87,7 @@
               "-c.setpdfwrite"
               (string-append "-f" name)))))
 
-    (ly:message (_ "Converting to `~a'...") pdf-name)
-    (ly:progress "\n")
+    (ly:message (_ "Converting to `~a'...\n") pdf-name)
     (ly:system cmd)))
 
 (define-public (postscript->png resolution paper-width paper-height name)
index 18728e57d9809de9b1865209cfb5e7677103b59d..aa022974e38adaa9637d5d1c512d12bb3e54b6f7 100644 (file)
@@ -937,25 +937,45 @@ the use of @code{\\simple} is unnecessary.
 Like simple-markup, but use tie characters for @q{~} tilde symbols.
 
 @lilypond[verbatim,quote]
-\\markup {
-  \\tied-lyric #\"Lasciate~i monti\"
-}
-@end lilypond"
-  (if (string-contains str "~")
-      (let*
-         ((half-space (/ word-space 2))
-          (parts (string-split str #\~))
-          (tie-str (markup #:hspace half-space
-                           #:musicglyph "ties.lyric"
-                           #:hspace half-space))
-          (joined  (list-join parts tie-str))
-          (join-stencil (interpret-markup layout props tie-str))
-          )
+\\markup \\column {
+  \\tied-lyric #\"Siam navi~all'onde~algenti Lasciate~in abbandono\"
+  \\tied-lyric #\"Impetuosi venti I nostri~affetti sono\"
+  \\tied-lyric #\"Ogni diletto~e scoglio Tutta la vita~e~un mar.\"
+}
+@end lilypond"
+  (define (replace-ties tie str)
+    (if (string-contains str "~")
+        (let*
+          ((half-space (/ word-space 2))
+           (parts (string-split str #\~))
+           (tie-str (markup #:hspace half-space
+                            #:musicglyph tie
+                            #:hspace half-space))
+           (joined  (list-join parts tie-str)))
+          (make-concat-markup joined))
+        str))
+
+  (define short-tie-regexp (make-regexp "~[^.]~"))
+  (define (match-short str) (regexp-exec short-tie-regexp str))
+
+  (define (replace-short str mkp)
+    (let ((match (match-short str)))
+      (if (not match)
+          (make-concat-markup (list
+            mkp
+            (replace-ties "ties.lyric.default" str)))
+          (let ((new-str (match:suffix match))
+                (new-mkp (make-concat-markup (list
+                          mkp
+                          (replace-ties "ties.lyric.default"
+                                        (match:prefix match))
+                          (replace-ties "ties.lyric.short"
+                                        (match:substring match))))))
+              (replace-short new-str new-mkp)))))
 
-       (interpret-markup layout
-                         props
-                         (make-concat-markup joined)))
-      (interpret-markup layout props str)))
+  (interpret-markup layout
+                    props
+                    (replace-short str (markup))))
 
 (define-public empty-markup
   (make-simple-markup ""))
@@ -1863,6 +1883,14 @@ Add padding @var{amount} around @var{arg} in the X@tie{}direction.
 ;; property
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(define-markup-command (property-recursive layout props symbol)
+  (symbol?)
+  #:category other
+  "Print out a warning when a header field markup contains some recursive
+markup definition."
+  (ly:warning "Recursive definition of property ~a detected!" symbol)
+  empty-stencil)
+
 (define-markup-command (fromproperty layout props symbol)
   (symbol?)
   #:category other
@@ -1885,11 +1913,12 @@ returns an empty markup.
 @end lilypond"
   (let ((m (chain-assoc-get symbol props)))
     (if (markup? m)
-        (interpret-markup layout props m)
+        ;; prevent infinite loops by clearing the interpreted property:
+        (interpret-markup layout (cons (list (cons symbol `(,property-recursive-markup ,symbol))) props) m)
         empty-stencil)))
 
 (define-markup-command (on-the-fly layout props procedure arg)
-  (symbol? markup?)
+  (procedure? markup?)
   #:category other
   "Apply the @var{procedure} markup command to @var{arg}.
 @var{procedure} should take a single argument."
index bbea5afab996462f9eedb9a6ee3613f65581ce5a..b82cd08aa2a2630077c06e38950eab438df7aa50 100644 (file)
@@ -120,6 +120,10 @@ jobs.")
     (log-file #f
 "If string FOO is given as argument, redirect
 output to log file `FOO.log'.")
+    (max-markup-depth 1024
+"Maximum depth for the markup tree. If a markup has more levels,
+assume it will not terminate on its own, print a warning and return a
+null markup instead.")
     (midi-extension ,(if (eq? PLATFORM 'windows)
                          "mid"
                          "midi")
@@ -348,11 +352,10 @@ Print a message at LOCATION if any predicate failed."
     (define (helper pred? arg count)
       (if (not (pred? arg))
           (begin
-            (ly:input-message
+            (ly:input-warning
              location
-             (format
-              #f (_ "wrong type for argument ~a.  Expecting ~a, found ~s")
-              count (type-name pred?) arg))
+             (_ "wrong type for argument ~a.  Expecting ~a, found ~s")
+              count (type-name pred?) arg)
             #f)
           #t))
 
index 4f79a2bae39da6d66b967da96e5a71a864793064..4dc9df6568b38b06133d4a38b24233617bab2507 100644 (file)
@@ -400,10 +400,12 @@ in @var{grob}."
              'grob-property gprop))
 
 (define direction-polyphonic-grobs
-  '(DotColumn
+  '(AccidentalSuggestion
+    DotColumn
     Dots
     Fingering
     LaissezVibrerTie
+    LigatureBracket
     PhrasingSlur
     RepeatTie
     Rest
@@ -412,7 +414,8 @@ in @var{grob}."
     Stem
     TextScript
     Tie
-    TupletBracket))
+    TupletBracket
+    TrillSpanner))
 
 (define-safe-public (make-voice-props-set n)
   (make-sequential-music
index caffb9aeda8d3dd717d607917684cddaf9a009b6..936217f184c1e8db81783b86d344eb34a973f5a3 100644 (file)
 ;; copy of ly:system. ly:* not available via lilypond-ps2png.scm
 (define (my-system be-verbose exit-on-error cmd)
   (define status 0)
-  (if be-verbose
-      (begin
-       (format (current-error-port) (_ "Invoking `~a'...") cmd)
-       (newline (current-error-port))))
+  (ly:debug (_ "Invoking `~a'...\n") cmd)
   (set! status (system cmd))
   (if (not (= status 0))
       (begin
-       (format (current-error-port)
-               (format #f (_ "~a exited with status: ~S") "GS" status))
+       (ly:error (_ "~a exited with status: ~S") "GS" status)
        (if exit-on-error (exit 1))))
   status)
 
index 4c990d9f042b9164afa2f743356c2b6ed66f07fa..cc4865cf3d0448b6986711a8a41ceb0b568308ed 100644 (file)
@@ -20,7 +20,7 @@ MAKEINFO = LANG= $(MAKEINFO_PROGRAM) $(MAKEINFO_FLAGS)
 XREF_MAPS_DIR = $(top-build-dir)/$(outdir)/xref-maps
 XREF_MAPS_FILES += $(TEXI_FILES:%.texi=$(XREF_MAPS_DIR)/%.xref-map) \
  $(TELY_FILES:%.tely=$(XREF_MAPS_DIR)/%.xref-map)
-XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir)
+XREF_MAP_FLAGS += -I $(outdir) -I $(src-dir) $(DOCUMENTATION_INCLUDES)
 
 ###########
 ifneq ($(ISOLANG),)