summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-17 20:24:35 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-17 20:24:35 -0800
commitf1bcb15c4979b9af3823223854fe16bfe155b2fe (patch)
tree06876e383ffff77ed1542af15e1d30d675875510 /eval.c
parentb76485e540762c60ba34dc36875c3b936f4df7b8 (diff)
downloadtxr-f1bcb15c4979b9af3823223854fe16bfe155b2fe.tar.gz
txr-f1bcb15c4979b9af3823223854fe16bfe155b2fe.tar.bz2
txr-f1bcb15c4979b9af3823223854fe16bfe155b2fe.zip
* eval.c (expand): Bugfix: do not expand any part of the macro
form via expand_forms. This is completely wrong since only the macro knows what material is evaluated and what isn't.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index 54e7024e..719f007b 100644
--- a/eval.c
+++ b/eval.c
@@ -2188,10 +2188,7 @@ tail:
val result = eval_progn(args_ex, make_env(nil, nil, nil), args);
return cons(quote_s, cons(result, nil));
} else if ((macro = gethash(top_mb, sym))) {
- val args = rest(form);
- val args_ex = expand_forms(args);
- val form_ex = if3(args_ex == args, form, cons(sym, args_ex));
- val mac_expand = expand_macro(form_ex, macro, make_env(nil, nil, nil));
+ val mac_expand = expand_macro(form, macro, make_env(nil, nil, nil));
if (mac_expand == form)
return form;
rlcp_tree(mac_expand, form);