summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eval.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index dbb7a21f..b192459a 100644
--- a/eval.c
+++ b/eval.c
@@ -2870,6 +2870,16 @@ static val optimize_qquote_form(val form)
return rlcp_tree(cons(list_s, args), form);
}
+ if (sym == rcons_s) {
+ if (args && cdr(args) && !cddr(args) &&
+ all_satisfy(args, quote_form_p_f, nil))
+ {
+ val args_noq = mapcar(second_f, args);
+ return rlcp(rcons(first(args_noq), second(args_noq)), form);
+ }
+ return form;
+ }
+
return form;
}
}