diff options
author | Daniel Mendler <mail@daniel-mendler.de> | 2021-12-19 14:21:50 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-12-19 14:22:27 +0100 |
commit | d9d38059d193699c2ae6cdf69341f5aa62e87781 (patch) | |
tree | 1281349816a9dff994158e83483235b9c9b6e483 /lisp/emacs-lisp/elp.el | |
parent | 25d80456084e25c6d8b6cdcac21b2122f4ad26f0 (diff) | |
download | emacs-d9d38059d193699c2ae6cdf69341f5aa62e87781.tar.gz emacs-d9d38059d193699c2ae6cdf69341f5aa62e87781.tar.bz2 emacs-d9d38059d193699c2ae6cdf69341f5aa62e87781.zip |
Add a new elp-restore-package command
* lisp/emacs-lisp/elp.el (elp-restore-package): New command
(bug#52457).
Diffstat (limited to 'lisp/emacs-lisp/elp.el')
-rw-r--r-- | lisp/emacs-lisp/elp.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index dce8478d2e3..fdd0ad6666e 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -298,6 +298,14 @@ For example, to instrument all ELP functions, do the following: 'intern (all-completions prefix obarray 'elp-profilable-p)))) +(defun elp-restore-package (prefix) + "Remove instrumentation from functions with names starting with PREFIX." + (interactive "SPrefix: ") + (elp-restore-list + (mapcar #'intern + (all-completions (symbol-name prefix) + obarray 'elp-profilable-p)))) + (defun elp-restore-list (&optional list) "Restore the original definitions for all functions in `elp-function-list'. Use optional LIST if provided instead." |