[slime-devel] non-helpful argument list display for defmethod

Nikodemus Siivola nikodemus at random-state.net
Sat May 9 10:48:41 UTC 2009


Example:

(defgeneric foo (instance &rest initargs &key &allow-other-keys))

(defmethod foo ((cons cons) &key (car (car cons)) (cdr (cdr cons)))
  (setf (car cons) car
        (cdr cons) cdr)
  cons)

(defmethod foo [])

where [] is the point shows

(defmethod foo
  (instance &rest initargs &key (cdr (cdr cons)) (car (car cons))
(imagpart (imagpart complex))
   (realpart (realpart complex)) &allow-other-keys)
 &body body)

in the minibuffer. Showing the CAR, CDR, IMAGPART and REALPART keys
seems pretty pointless, and showing their initforms doubly so. Could
we stick to the DEFGENERIC's lambda-list there, please? It's the one
the method has to be congruent with.

A related, but more blue-sky issue: In case of

(foo [])

the situation is better, but still having keywords from both lists is
confusing. What could be really neat is that if after

(foo x :car [])

the minibuffer would display only the lambda lists for the methods for
which :CAR is a legal keyword argument.

Cheers,

 -- Nikodemus




More information about the slime-devel mailing list