]> git.eshelyaron.com Git - emacs.git/commitdiff
Add a new elp-restore-package command
authorDaniel Mendler <mail@daniel-mendler.de>
Sun, 19 Dec 2021 13:21:50 +0000 (14:21 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 19 Dec 2021 13:22:27 +0000 (14:22 +0100)
* lisp/emacs-lisp/elp.el (elp-restore-package): New command
(bug#52457).

lisp/emacs-lisp/elp.el

index dce8478d2e3bf7aa85cbaa1e1b7ba473e36ffc79..fdd0ad6666e9a14218008d3caedf435a1d94dbc8 100644 (file)
@@ -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."