[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d9d3805 2/2: Add a new elp-restore-package command
From: |
Lars Ingebrigtsen |
Subject: |
master d9d3805 2/2: Add a new elp-restore-package command |
Date: |
Sun, 19 Dec 2021 08:22:34 -0500 (EST) |
branch: master
commit d9d38059d193699c2ae6cdf69341f5aa62e87781
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Add a new elp-restore-package command
* lisp/emacs-lisp/elp.el (elp-restore-package): New command
(bug#52457).
---
lisp/emacs-lisp/elp.el | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el
index dce8478..fdd0ad6 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."