summaryrefslogtreecommitdiffstats
path: root/txr.c
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
commit0c7ab22f4ea9541514782694ea2a64485d72f0a3 (patch)
tree7743a0acc9158b04288ba0eeeda7e9acb7158ad4 /txr.c
parent86e34526a52f4102ffdab6d7249d529a2174c87f (diff)
downloadtxr-0c7ab22f4ea9541514782694ea2a64485d72f0a3.tar.gz
txr-0c7ab22f4ea9541514782694ea2a64485d72f0a3.tar.bz2
txr-0c7ab22f4ea9541514782694ea2a64485d72f0a3.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.
Diffstat (limited to 'txr.c')
-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;