[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use call-next-method with an &rest argument



How can call-next-method be used within a method that has an &rest 
argument.  Suppose that I want to add an initialization argument 
:foo to the list of initargs passed to initialize-instance.

(defmethod initialize-instance :around ((self my-class) &rest initargs)
  (call-next-method self (append (list :foo 10) initargs)))

The method above is not correct, the next method will always be passed 
exactly two arguments.

Thanks,
Darrell Shane