diff options
| author | Stefan Monnier | 2017-07-27 22:51:37 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2017-07-27 22:51:37 -0400 |
| commit | 955e0cbb32225a53ac8b5b8f2235fb251d83f49e (patch) | |
| tree | 2592e3ec1c568c74987556ff8e83743d96cf6be0 | |
| parent | eaa5dc9d102d10c79f10bee1994ad922b8fcf9c4 (diff) | |
| download | emacs-955e0cbb32225a53ac8b5b8f2235fb251d83f49e.tar.gz emacs-955e0cbb32225a53ac8b5b8f2235fb251d83f49e.zip | |
* lisp/loadhist.el (unload-feature): Remove ad-hoc ELP code
* lisp/emacs-lisp/elp.el (loadhist-unload-element): Un-instrument functions.
| -rw-r--r-- | lisp/emacs-lisp/elp.el | 5 | ||||
| -rw-r--r-- | 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 d4500f131a2..7bdd749d5ab 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el | |||
| @@ -583,6 +583,11 @@ displayed." | |||
| 583 | (elp-restore-all) | 583 | (elp-restore-all) |
| 584 | ;; continue standard unloading | 584 | ;; continue standard unloading |
| 585 | nil) | 585 | nil) |
| 586 | |||
| 587 | (cl-defmethod loadhist-unload-element :before :extra "elp" ((x (head defun))) | ||
| 588 | "Un-instrument before unloading a function." | ||
| 589 | (elp-restore-function (cdr x))) | ||
| 590 | |||
| 586 | 591 | ||
| 587 | (provide 'elp) | 592 | (provide 'elp) |
| 588 | 593 | ||
diff --git a/lisp/loadhist.el b/lisp/loadhist.el index 24c3acd1b99..b83d023ccf8 100644 --- a/lisp/loadhist.el +++ b/lisp/loadhist.el | |||
| @@ -301,11 +301,6 @@ something strange, such as redefining an Emacs function." | |||
| 301 | ;; Change major mode in all buffers using one defined in the feature being unloaded. | 301 | ;; Change major mode in all buffers using one defined in the feature being unloaded. |
| 302 | (unload--set-major-mode) | 302 | (unload--set-major-mode) |
| 303 | 303 | ||
| 304 | (when (fboundp 'elp-restore-function) ; remove ELP stuff first | ||
| 305 | (dolist (elt unload-function-defs-list) | ||
| 306 | (when (symbolp elt) | ||
| 307 | (elp-restore-function elt)))) | ||
| 308 | |||
| 309 | (mapc #'loadhist-unload-element unload-function-defs-list) | 304 | (mapc #'loadhist-unload-element unload-function-defs-list) |
| 310 | ;; Delete the load-history element for this file. | 305 | ;; Delete the load-history element for this file. |
| 311 | (setq load-history (delq (assoc file load-history) load-history)))) | 306 | (setq load-history (delq (assoc file load-history) load-history)))) |