summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-23 20:56:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-23 20:56:36 -0700
commit8685a7c31728ad61fb21d8d1b95097e863cb70cd (patch)
tree180e191f2e4a4db7fd6edb4c6d45797f878fa421
parent9b055e3354d1867f7dd90db499751c76285173ea (diff)
downloadtxr-8685a7c31728ad61fb21d8d1b95097e863cb70cd.tar.gz
txr-8685a7c31728ad61fb21d8d1b95097e863cb70cd.tar.bz2
txr-8685a7c31728ad61fb21d8d1b95097e863cb70cd.zip
Track origin across op/do expansion.
* eval.c (me_op): We tell a little lie here, by indicating that the "dwim body" is an expansion of the op operator. Of course, the entire lambda containing that body is that expansion. But in error messages, we need something useful for the user.
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index 92b54b52..f3dca033 100644
--- a/eval.c
+++ b/eval.c
@@ -2945,6 +2945,8 @@ static val me_op(val form, val menv)
if (sym == do_s)
dwim_body = rlcp(cdr(dwim_body), dwim_body);
+ set_origin(dwim_body, form);
+
return cons(lambda_s,
cons(append2(mapcar(cdr_f, ssyms), rest_gensym),
cons(dwim_body, nil)));