From 68d98739fc4493c9dce4de93ac74d6d28e4ddc7e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 24 Jun 2004 07:08:40 +0000 Subject: [PATCH] (parse_string): switch module too. --- ChangeLog | 4 ++++ lily/my-lily-parser.cc | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 0e8ce2a877..20da753d7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-06-24 Han-Wen Nienhuys + + * lily/my-lily-parser.cc (parse_string): switch module too. + 2004-06-24 Jan Nieuwenhuizen * Documentation/topdocs/INSTALL.texi (Top): Add guile, python and diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 7032ed78ba..2af2dd1458 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -121,6 +121,10 @@ My_lily_parser::parse_string (String ly_code) lexer_ = (parent == 0 ? new My_lily_lexer (sources_) : new My_lily_lexer (*parent)); + + SCM oldmod = scm_current_module (); + scm_set_current_module (ly_car (lexer_->scopes_)); + // TODO: use $parser lexer_->set_identifier (ly_symbol2scm ("parser"), self_scm ()); @@ -152,6 +156,7 @@ My_lily_parser::parse_string (String ly_code) parent->main_input_b_ = lexer_->main_input_b_; } + scm_set_current_module (oldmod); delete lexer_; lexer_ = 0; } -- 2.39.5