summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--eval.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/eval.c b/eval.c
index 610c9b40..72f98210 100644
--- a/eval.c
+++ b/eval.c
@@ -3093,10 +3093,17 @@ static val dot_to_apply(val form, val lisp1_p)
}
if (args) {
- val sym = car(form);
- return cons(sys_apply_s, cons(if3(lisp1_p,
- sym,
- list(fun_s, sym, nao)),
+ val fun = car(form);
+ val nofun = nil;
+
+ while (fun == call_s) {
+ fun = car(args);
+ nofun = t;
+ pop(&args);
+ }
+ return cons(sys_apply_s, cons(if3(lisp1_p || nofun,
+ fun,
+ list(fun_s, fun, nao)),
args));
}