From 69fb12a66b3d6b9bfb55d8bcd58bec2a8e7ca55b Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 24 Jul 2017 15:58:30 -0400 Subject: (loadhist-unload-element): Move ERT and cl-generic methods * lisp/loadhist.el (loadhist-unload-element): Don't define cl-generic and ert methods here. (loadhist-unload-element) <(head define-type)>: Remove unused var `slots'. * lisp/emacs-lisp/cl-generic.el (loadhist-unload-element): Define unload method for cl-defmethod. (cl-generic-ensure-function): Remove redundant `defalias'. * lisp/emacs-lisp/ert.el (ert-set-test): Move the current-load-list setting here... (ert-deftest): ...from here. (loadhist-unload-element): Define unload method for ert-deftest. --- lisp/loadhist.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'lisp/loadhist.el') diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 693050d7044..24c3acd1b99 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el @@ -196,11 +196,8 @@ restore a previous autoload if possible.") (cl-defmethod loadhist-unload-element ((x (head autoload))) (loadhist--unload-function x)) -(cl-defmethod loadhist-unload-element ((x (head require))) nil) -(cl-defmethod loadhist-unload-element ((x (head defface))) nil) -;; The following two might require more actions. -(cl-defmethod loadhist-unload-element ((x (head ert-deftest))) nil) -(cl-defmethod loadhist-unload-element ((x (head cl-defmethod))) nil) +(cl-defmethod loadhist-unload-element ((_ (head require))) nil) +(cl-defmethod loadhist-unload-element ((_ (head defface))) nil) (cl-defmethod loadhist-unload-element ((x (head provide))) ;; Remove any feature names that this file provided. @@ -220,8 +217,7 @@ restore a previous autoload if possible.") (makunbound x))) (cl-defmethod loadhist-unload-element ((x (head define-type))) - (let* ((name (cdr x)) - (slots (mapcar 'car (cdr (cl-struct-slot-info name))))) + (let* ((name (cdr x))) ;; Remove the struct. (setf (cl--find-class name) nil))) -- cgit v1.2.3