diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | eval.c | 5 |
2 files changed, 7 insertions, 4 deletions
@@ -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 @@ -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); |