summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-09-06 08:57:48 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-09-06 08:57:48 -0700
commit3b2c323f98ff0c032565d288032b59e1a6c93502 (patch)
tree41dc659ac12e2e3ec94773873f76957f9fdca9ba /txr.c
parent05c23e031c7e949fd154602945d0f150cbb14c73 (diff)
downloadtxr-3b2c323f98ff0c032565d288032b59e1a6c93502.tar.gz
txr-3b2c323f98ff0c032565d288032b59e1a6c93502.tar.bz2
txr-3b2c323f98ff0c032565d288032b59e1a6c93502.zip
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".
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c5
1 files 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;
}