mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-16 17:37:34 +02:00
Resetting (interaction-environment) after -x<language>.
This commit is contained in:
parent
e2bda89eba
commit
0ad792a100
1 changed files with 4 additions and 1 deletions
5
main.c
5
main.c
|
@ -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':
|
||||||
|
|
Loading…
Add table
Reference in a new issue