(unless (member state
'(:required :optional :post-rest :post-more))
(compiler-error "misplaced &KEY in lambda list: ~S" list))
+ (when (optional)
+ (style-warn
+ "&OPTIONAL and &KEY found in the same lambda list: ~S" list))
(setq keyp t
state :key))
(&allow-other-keys
(frob (x y) (position-if x y))
(frob (x y) (position-if-not x y))
(frob (x) (aref x 0)))
+
+(macrolet ((frob (style-warn-p form)
+ (if style-warn-p
+ `(catch :got-style-warning
+ (handler-case
+ (eval ',form)
+ (style-warning (e) (throw :got-style-warning nil)))
+ (error "missing style-warning for ~S" ',form))
+ `(handler-case
+ (eval ',form)
+ (style-warning (e)
+ (error "bad style-warning for ~S: ~A" ',form e))))))
+ (frob t (lambda (x &optional y &key z) (list x y z)))
+ (frob nil (lambda (x &optional y z) (list x y z)))
+ (frob nil (lambda (x &key y z) (list x y z)))
+ (frob t (defgeneric #:foo (x &optional y &key z)))
+ (frob nil (defgeneric #:foo (x &optional y z)))
+ (frob nil (defgeneric #:foo (x &key y z)))
+ (frob t (defun #:foo (x) (flet ((foo (x &optional y &key z) (list x y z))) (foo x x :z x)))))
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.11.13"
+"0.8.11.14"