diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-11-24 21:13:37 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-11-24 21:13:37 -0800 |
commit | d4bde7c16e9598ec44364fe485aa9b54fb799057 (patch) | |
tree | 88432ac90bbca601fd52593ccb0a047309619083 /eval.c | |
parent | bd7391ed5d5aee987c9354931e393171334da234 (diff) | |
download | txr-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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); |