Log Message:
-----------
BACKPORT: Avoid side-effect of loading String context that sets the
string context to being the current context. (This fixes bug 1520)
Tags:
----
rel-2-4-patches
Modified Files:
--------------
pg/macros:
parserPopUp.pl
Revision Data
-------------
Index: parserPopUp.pl
===================================================================
RCS file: /webwork/cvs/system/pg/macros/parserPopUp.pl,v
retrieving revision 1.1.6.2.2.1
retrieving revision 1.1.6.2.2.2
diff -Lmacros/parserPopUp.pl -Lmacros/parserPopUp.pl -u -r1.1.6.2.2.1 -r1.1.6.2.2.2
--- macros/parserPopUp.pl
+++ macros/parserPopUp.pl
@@ -49,7 +49,7 @@
=cut
-loadMacros('MathObjects.pl','contextString.pl');
+loadMacros('MathObjects.pl');
sub _parserPopUp_init {parserPopUp::Init()}; # don't reload this file
@@ -62,7 +62,14 @@
#
# Setup the main:: namespace
#
-sub Init {main::PG_restricted_eval('sub PopUp {parserPopUp->new(@_)}')}
+sub Init {
+ ### Hack to get around context change in contextString.pl
+ ### FIXME: when context definitions don't set context, put loadMacros with MathObject.pl above again
+ my $context = main::Context();
+ main::loadMacros('contextString.pl');
+ main::Context($context);
+ main::PG_restricted_eval('sub PopUp {parserPopUp->new(@_)}');
+}
#
# Create a new PopUp object
|