diff --git a/pcl/plap.lisp b/pcl/plap.lisp index 5a0ab57ffd2a5a93ac2cea805e273592a230d5ec..6e40319e87c03f5d1e4f8e282a90147bf0e4d4e2 100644 --- a/pcl/plap.lisp +++ b/pcl/plap.lisp @@ -89,8 +89,11 @@ (*lap-rest-p* (not (null rest)))) `(lambda ,cvars #'(lambda ,args - (declare (optimize . ,*lap-optimize-declaration*)) - ,(make-lap-prog-internal i-regs v-regs t-regs lap)))))) + ;; + ;; Use LOCALLY instead of a declare on the lambda so that we don't + ;; suppress arg count checking... + (locally (declare (optimize . ,*lap-optimize-declaration*)) + ,(make-lap-prog-internal i-regs v-regs t-regs lap))))))) (defun make-lap-prog (i-regs v-regs t-regs lap) (let* ((*lap-args* 'lap-in-lisp)