clos: reinitialize-instance: don't remove generic functions

Local function REMOVE-OPTIONAL-SLOT-ACCESSORS removed generic
functions after removing methods while redefining the class if said
generic functions have no other methods. There is nothing in the spec
what would justify it, so we don't fmakunbound these functions
anymore.
This commit is contained in:
Daniel Kochmański 2020-04-14 17:03:45 +02:00
parent 681caade84
commit 5feb42dfa3

View file

@ -239,9 +239,7 @@
;; after method
(when (setq found
(find-method gf-object ':after (list class) nil))
(remove-method gf-object found))
(when (null (generic-function-methods gf-object))
(fmakunbound reader))))
(remove-method gf-object found))))
;; remove previous defined writer methods
(dolist (writer (slot-definition-writers slotd))
@ -258,6 +256,4 @@
;; after method
(when (setq found
(find-method gf-object ':after (list 'T class) nil))
(remove-method gf-object found))
(when (null (generic-function-methods gf-object))
(fmakunbound writer))))))
(remove-method gf-object found))))))