From f218366f20fc90045ad4466919786e69b293dc41 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 14 Jul 2014 20:43:37 -0700 Subject: * txr.c (txr_main): Allow Lisp code executed via -e and -p options to see the bindings set up by prior -D options. --- ChangeLog | 5 +++++ txr.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index a4ee33d3..d71f2655 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-07-14 Kaz Kylheku + + * txr.c (txr_main): Allow Lisp code executed via -e and -p options to + see the bindings set up by prior -D options. + 2014-07-14 Kaz Kylheku * eval.c (eval_init): Register interpose and lconsp as intrinsics. diff --git a/txr.c b/txr.c index 4d666635..c72973a0 100644 --- a/txr.c +++ b/txr.c @@ -407,12 +407,12 @@ int txr_main(int argc, char **argv) spec_file = arg; break; case 'e': - eval_intrinsic(lisp_parse(arg, std_error), nil); + eval_intrinsic(lisp_parse(arg, std_error), make_env(bindings, nil, nil)); evaled = t; break; case 'p': obj_print(eval_intrinsic(lisp_parse(arg, std_error), - nil), std_output); + make_env(bindings, nil, nil)), std_output); put_char(chr('\n'), std_output); evaled = t; break; -- cgit v1.2.3