]> git.donarmstrong.com Git - lilypond.git/commitdiff
Yoshinobu Ishizaki's patch to allow multiple header definitions.
authorGraham Percival <graham@percival-music.ca>
Tue, 19 Jul 2005 05:22:25 +0000 (05:22 +0000)
committerGraham Percival <graham@percival-music.ca>
Tue, 19 Jul 2005 05:22:25 +0000 (05:22 +0000)
ChangeLog
lily/parser.yy

index 0d5d1f35b2d4e3762f453842cb0913f2167f00bf..78531bcef2b0b7c2786a7863c41b4f9a418365de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-07-18  Yoshinobu Isizaki  <isizaki@mte.biglobe.ne.jp>
+
+       * lily/parser.yy (lilypond_header_body): enables
+       multiple header definition.
+
 2005-07-19  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/include/translator.icc
index 2b5b6c0caae935773ae88ba89277a6e0604532b1..03df3be127c1daad4c05e6d3b55341e08447b048 100644 (file)
@@ -626,8 +626,16 @@ embedded_scm:
 
 lilypond_header_body:
        {
-               $$ = ly_make_anonymous_module (be_safe_global);
-               THIS->lexer_->add_scope ($$);
+               SCM id = THIS->lexer_->lookup_identifier("$globalheader");
+               if ( ly_is_module(id) ){
+                       // if the header exists, then comes here.
+                       THIS->lexer_->add_scope(id);
+                       $$ = id;
+               }else{  
+                       /* org code */
+                       $$ = ly_make_anonymous_module (be_safe_global);
+                       THIS->lexer_->add_scope ($$);
+               }
        }
        | lilypond_header_body assignment  {