- (let ((lambda-list nil))
- (dotimes (i (length metatypes))
- (push (dfun-arg-symbol i) lambda-list))
- (when applyp
- ;; Use &MORE arguments to avoid consing up an &REST list that we
- ;; might not need at all. See MAKE-EMF-CALL and
- ;; INVOKE-EFFECTIVE-METHOD-FUNCTION for the other pieces.
- (push '&more lambda-list)
- (push '.dfun-more-context. lambda-list)
- (push '.dfun-more-count. lambda-list))
- (nreverse lambda-list)))
+ (let ((required (make-dfun-required-args metatypes)))
+ (if applyp
+ (nconc required
+ ;; Use &MORE arguments to avoid consing up an &REST list
+ ;; that we might not need at all. See MAKE-EMF-CALL and
+ ;; INVOKE-EFFECTIVE-METHOD-FUNCTION for the other
+ ;; pieces.
+ '(&more .dfun-more-context. .dfun-more-count.))
+ required)))