Search code examples
common-lispslimesbcl

Redefine generic function with different lambda list


I've made a mistake and forgot to specify keyword arguments in defgeneric the first time I've compiled it. Now I really don't want to restart SLIME only to redefine this one defgeneric to include more arguments. Is there a way to "undefine" it somehow?

Oh, sorry, never mind, after removing all methods defined for that generic, SBCL redefined it, so it's all good now:

(remove-method #'some-generic 
  (find-method #'some-generic '() (list of method types)))

For posterity.


Solution

  • See fmakunbound.

    (fmakunbound 'some-generic)