From 7c010ed8ec8d733f5c6764c32691a33da51240bc Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 22 Jan 2017 10:04:06 -0800 Subject: Dynamically rebind *package* in @(load). * match.c (v_load): Re-bind the *package* variable in the new dynamic scope to its current value, so that any modifications to it by the loaded code are thrown away, just like in the Lisp load function. --- match.c | 1 + 1 file changed, 1 insertion(+) (limited to 'match.c') diff --git a/match.c b/match.c index a97a2b65..3d334deb 100644 --- a/match.c +++ b/match.c @@ -3995,6 +3995,7 @@ static val v_load(match_files_ctx *c) dyn_env = make_env(nil, nil, dyn_env); env_vbind(dyn_env, load_path_s, name); env_vbind(dyn_env, load_recursive_s, t); + env_vbind(dyn_env, package_s, cur_package); if (!txr_lisp_p) { int gc = gc_state(0); -- cgit v1.2.3