* lisp/emacs-lisp/elp.el (loadhist-unload-element): Un-instrument functions.
(elp-restore-all)
;; continue standard unloading
nil)
+
+(cl-defmethod loadhist-unload-element :before :extra "elp" ((x (head defun)))
+ "Un-instrument before unloading a function."
+ (elp-restore-function (cdr x)))
+
\f
(provide 'elp)
;; Change major mode in all buffers using one defined in the feature being unloaded.
(unload--set-major-mode)
- (when (fboundp 'elp-restore-function) ; remove ELP stuff first
- (dolist (elt unload-function-defs-list)
- (when (symbolp elt)
- (elp-restore-function elt))))
-
(mapc #'loadhist-unload-element unload-function-defs-list)
;; Delete the load-history element for this file.
(setq load-history (delq (assoc file load-history) load-history))))