summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-11-24 21:13:37 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-11-24 21:13:37 -0800
commitd4bde7c16e9598ec44364fe485aa9b54fb799057 (patch)
tree88432ac90bbca601fd52593ccb0a047309619083 /eval.c
parentbd7391ed5d5aee987c9354931e393171334da234 (diff)
downloadtxr-d4bde7c16e9598ec44364fe485aa9b54fb799057.tar.gz
txr-d4bde7c16e9598ec44364fe485aa9b54fb799057.tar.bz2
txr-d4bde7c16e9598ec44364fe485aa9b54fb799057.zip
bugfix: op macro using wrong expansions op.
* eval.c (me_op): When the operator is op, the arguments must be expanded as Lisp-1 with expand_forms_lisp1, not with the regular expand_forms.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 1114846b..4e617f9e 100644
--- a/eval.c
+++ b/eval.c
@@ -3116,7 +3116,9 @@ static val supplement_op_syms(val ssyms, val max)
static val me_op(val form, val menv)
{
cons_bind (sym, body, form);
- val body_ex = if3(sym == op_s, expand_forms(body, menv), expand(body, menv));
+ val body_ex = if3(sym == op_s,
+ expand_forms_lisp1(body, menv),
+ expand(body, menv));
val rest_gensym = gensym(lit("rest-"));
cons_bind (syms, body_trans, transform_op(body_ex, nil, rest_gensym));
val ssyms = sort(syms, func_n2(lt), car_f);