- state :aux))
- (t (bug "unknown LAMBDA-LIST-KEYWORD in lambda list: ~S." arg)))
- (progn
- (when (symbolp arg)
- (let ((name (symbol-name arg)))
- (when (and (plusp (length name))
- (char= (char name 0) #\&))
- (style-warn
- "suspicious variable in lambda list: ~S." arg))))
- (case state
- (:required (required arg))
- (:optional (optional arg))
- (:rest
- (setq restp t
- rest arg
- state :post-rest))
- (:more-context
- (setq more-context arg
- state :more-count))
- (:more-count
- (setq more-count arg
- state :post-more))
- (:key (keys arg))
- (:aux (aux arg))
- (t
- (compiler-error "found garbage in lambda list when expecting ~
+ state :aux))
+ (t
+ ;; It could be argued that &WHOLE and friends would be
+ ;; just ordinary variables in an ordinary lambda-list,
+ ;; but since (1) that seem exceedingly to have been the
+ ;; programmers intent and (2) the spec can be
+ ;; interpreted as giving as licence to signal an
+ ;; error[*] that is what we do.
+ ;;
+ ;; [* All lambda list keywords used in the
+ ;; implementation appear in LAMBDA-LIST-KEYWORDS. Each
+ ;; member of a lambda list is either a parameter
+ ;; specifier ot a lambda list keyword. Ergo, symbols
+ ;; appearing in LAMBDA-LIST-KEYWORDS cannot be
+ ;; parameter specifiers.]
+ (compiler-error 'simple-program-error
+ :format-control "Bad lambda list keyword ~S in: ~S"
+ :format-arguments (list arg list))))
+ (progn
+ (when (symbolp arg)
+ (let ((name (symbol-name arg)))
+ (when (and (plusp (length name))
+ (char= (char name 0) #\&))
+ ;; Should this be COMPILER-STYLE-WARN?
+ (unless silent
+ (style-warn
+ "suspicious variable in lambda list: ~S." arg)))))
+ (case state
+ (:required (required arg))
+ (:optional (optional arg))
+ (:rest
+ (setq restp t
+ rest arg
+ state :post-rest))
+ (:more-context
+ (setq more-context arg
+ state :more-count))
+ (:more-count
+ (setq more-count arg
+ state :post-more))
+ (:key (keys arg))
+ (:aux (aux arg))
+ (t
+ (compiler-error "found garbage in lambda list when expecting ~