summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-14 20:18:48 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-14 20:18:48 -0800
commit14266f42ce669e032fedd9f0ed5b364fe396968a (patch)
tree7743a0acc9158b04288ba0eeeda7e9acb7158ad4
parente0a41ce319523d4f5ae1e1948d9aacb549598a6c (diff)
downloadtxr-14266f42ce669e032fedd9f0ed5b364fe396968a.tar.gz
txr-14266f42ce669e032fedd9f0ed5b364fe396968a.tar.bz2
txr-14266f42ce669e032fedd9f0ed5b364fe396968a.zip
Switch to user package before entering repl.
* txr.c (txr_main): The file loaded by the -i command line argument could manipulate *package*. Let's reset *package* to the user package before running the REPL.
-rw-r--r--txr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 30a449f3..c31c7fa2 100644
--- a/txr.c
+++ b/txr.c
@@ -1005,6 +1005,7 @@ repl:
num(opt_compat), nao);
reg_var(args_s, or2(orig_args, arg_list));
reg_varl(intern(lit("self-path"), user_package), lit("listener"));
+ env_vbind(dyn_env, package_s, user_package);
repl(bindings, std_input, std_output);
#endif
return 0;