[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 955e0cb: * lisp/loadhist.el (unload-feature): Remov
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master 955e0cb: * lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code |
Date: |
Thu, 27 Jul 2017 22:51:43 -0400 (EDT) |
branch: master
commit 955e0cbb32225a53ac8b5b8f2235fb251d83f49e
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code
* lisp/emacs-lisp/elp.el (loadhist-unload-element): Un-instrument functions.
---
lisp/emacs-lisp/elp.el | 5 +++++
lisp/loadhist.el | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index d4500f1..7bdd749 100644
--- a/lisp/emacs-lisp/elp.el
+++ b/lisp/emacs-lisp/elp.el
@@ -583,6 +583,11 @@ displayed."
(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)))
+
(provide 'elp)
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 24c3acd..b83d023 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -301,11 +301,6 @@ something strange, such as redefining an Emacs function."
;; 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))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 955e0cb: * lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code,
Stefan Monnier <=