summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--eval.c4
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 3345d35b..267ea79a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2014-02-24 Kaz Kylheku <kaz@kylheku.com>
+ * eval.c (expand_qquote): Bugfix. Was not handling an unquote
+ in the dotted position: (qquote x1 .. xn . (unquote form)),
+ which looks like the structure (qquote x1 .. xn unquote form).
+ Fixed by a hack: after recursively expanding the (unquote form)
+ part (rest of the form), we check whether the unexpanded
+ version has unquote at the front. If so, we know the expansion is just
+ form, and use it to emit the suitable expansion.
+
+2014-02-24 Kaz Kylheku <kaz@kylheku.com>
+
Symbol macros.
* eval.c (top_smb, defsymacro_s, symacrolet_s): New global variables.
diff --git a/eval.c b/eval.c
index e00dc879..95983441 100644
--- a/eval.c
+++ b/eval.c
@@ -2065,7 +2065,9 @@ static val expand_qquote(val qquoted_form, val menv)
if (atom(r_ex)) {
return rlcp(cons(append_s, cons(f_ex, r_ex)), qquoted_form);
} else {
- if (car(r_ex) == append_s)
+ if (consp(r) && car(r) == unquote_s)
+ r_ex = cons(r_ex, nil);
+ else if (car(r_ex) == append_s)
r_ex = cdr(r_ex);
return rlcp(cons(append_s, cons(f_ex, r_ex)), qquoted_form);
}