From: gpercival Date: Tue, 19 Jul 2005 05:22:25 +0000 (+0000) Subject: Yoshinobu Ishizaki's patch to allow multiple header definitions. X-Git-Tag: release/2.7.2~23 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=17c508ec8b6516d45246bd0998b876f3e8c03afe;p=lilypond.git Yoshinobu Ishizaki's patch to allow multiple header definitions. --- diff --git a/ChangeLog b/ChangeLog index 0d5d1f35b2..78531bcef2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-07-18 Yoshinobu Isizaki + + * lily/parser.yy (lilypond_header_body): enables + multiple header definition. + 2005-07-19 Han-Wen Nienhuys * lily/include/translator.icc diff --git a/lily/parser.yy b/lily/parser.yy index 2b5b6c0caa..03df3be127 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -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 {