diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-07-14 20:43:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-07-14 20:43:37 -0700 |
commit | f218366f20fc90045ad4466919786e69b293dc41 (patch) | |
tree | a65bae18e78af48a1fe9a21a3a5b505cf450476a | |
parent | facdfbaf35edae7afb51f6c3dc4d5baa119ea605 (diff) | |
download | txr-f218366f20fc90045ad4466919786e69b293dc41.tar.gz txr-f218366f20fc90045ad4466919786e69b293dc41.tar.bz2 txr-f218366f20fc90045ad4466919786e69b293dc41.zip |
* txr.c (txr_main): Allow Lisp code executed via -e and -p options to
see the bindings set up by prior -D options.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | txr.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2014-07-14 Kaz Kylheku <kaz@kylheku.com> + * 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 <kaz@kylheku.com> + * eval.c (eval_init): Register interpose and lconsp as intrinsics. * lib.c (lconsp, interpose): New functions. @@ -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; |