You created methods, but you want to remove one from the running image. There is no default way.
(defmacro undefmethod (name &rest args)
"Undefine a method which was previously associated with a generic function.
Caveat: it doesn't work for EQL specialisers."
;; @shinmera
;; https://www.reddit.com/r/Common_Lisp/comments/1766lmu/cl_newbie_questions/
(flet ((lambda-keyword-p (symbol)
(find symbol lambda-list-keywords)))
(destructuring-bind (qualifiers args) (loop for thing = (pop args)
until (listp thing)
collect thing into qualifiers
finally (return (list qualifiers thing)))
`(remove-method
#',name
(find-method
#',name
',qualifiers
(mapcar #'find-class
',(loop for arg in args
until (lambda-keyword-p arg)
collect (if (listp arg) (second arg) T))))))))
Alexander adds:
I usually open generic function in the SLY inspector and remove needed methods from there.
You created methods, but you want to remove one from the running image. There is no default way.
Alexander adds: