summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--eval.c5
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3ba822c1..f96c18b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-02-17 Kaz Kylheku <kaz@kylheku.com>
+
+ * 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.
+
2014-02-16 Kaz Kylheku <kaz@kylheku.com>
* eval.c (op_tree_case): Removed superfluous handling of
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);