Resetting (interaction-environment) after -x<language>.

This commit is contained in:
Alex Shinn 2012-02-11 20:09:06 +09:00
parent e2bda89eba
commit 0ad792a100

5
main.c
View file

@ -355,7 +355,10 @@ void run_main (int argc, char **argv) {
if (*p == '.') *p=' '; if (*p == '.') *p=' ';
tmp = check_exception(ctx, sexp_eval_string(ctx, impmod, -1, (c=='x' ? sexp_global(ctx, SEXP_G_META_ENV) : env))); tmp = check_exception(ctx, sexp_eval_string(ctx, impmod, -1, (c=='x' ? sexp_global(ctx, SEXP_G_META_ENV) : env)));
free(impmod); free(impmod);
if (c == 'x') sexp_context_env(ctx) = env = tmp; if (c == 'x') {
sexp_context_env(ctx) = env = tmp;
sexp_set_parameter(ctx, env, sexp_global(ctx, SEXP_G_INTERACTION_ENV_SYMBOL), env);
}
#endif #endif
break; break;
case 'q': case 'q':