From 3b2c323f98ff0c032565d288032b59e1a6c93502 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 6 Sep 2015 08:57:48 -0700 Subject: Better stream name for command line expressions. * txr.c (txr_main): Pass the name argument to lisp_parse instead of defaulting it, so that errors against expressions passed on the command line are referred to "cmdline-expr" rather than the generic "string". --- txr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/txr.c b/txr.c index 67069e1a..99304900 100644 --- a/txr.c +++ b/txr.c @@ -580,7 +580,8 @@ int txr_main(int argc, char **argv) spec_file = arg; break; case 'e': - eval_intrinsic(lisp_parse(arg, std_error, colon_k, colon_k, colon_k), + eval_intrinsic(lisp_parse(arg, std_error, colon_k, + lit("cmdline-expr"), colon_k), make_env(bindings, nil, nil)); evaled = t; break; @@ -594,7 +595,7 @@ int txr_main(int argc, char **argv) pprinl, tprint)); pf(eval_intrinsic(lisp_parse(arg, std_error, colon_k, - colon_k, colon_k), + lit("cmdline-expr"), colon_k), make_env(bindings, nil, nil)), std_output); evaled = t; } -- cgit v1.2.3