diff options
author | Alan Mackenzie <acm@muc.de> | 2022-01-11 21:57:54 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2022-01-11 21:57:54 +0000 |
commit | 2128cd8c08da84ab40608ac5db0fecfce733cfad (patch) | |
tree | e295275b1a99aed2e5e0cc270f91614062c670f6 /lisp/emacs-lisp/elp.el | |
parent | 4e77177b063f9da8a48709aa3ef416d0ac21837b (diff) | |
parent | 18dac472553e6cd1102b644c2175012e12215c18 (diff) | |
download | emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.gz emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.bz2 emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.zip |
Merge branch 'master' into scratch/correct-warning-pos
Diffstat (limited to 'lisp/emacs-lisp/elp.el')
-rw-r--r-- | lisp/emacs-lisp/elp.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index fde7947a273..e5c94c09c27 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -1,6 +1,6 @@ ;;; elp.el --- Emacs Lisp Profiler -*- lexical-binding: t -*- -;; Copyright (C) 1994-2021 Free Software Foundation, Inc. +;; Copyright (C) 1994-2022 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw ;; Maintainer: emacs-devel@gnu.org @@ -298,10 +298,18 @@ 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." - (interactive "PList of functions to restore: ") ;FIXME: Doesn't work!? + (interactive) (mapcar #'elp-restore-function (or list elp-function-list))) (defun elp-restore-all () @@ -323,7 +331,7 @@ Use optional LIST if provided instead." (defun elp-reset-list (&optional list) "Reset the profiling information for all functions in `elp-function-list'. Use optional LIST if provided instead." - (interactive "PList of functions to reset: ") ;FIXME: Doesn't work!? + (interactive) (let ((list (or list elp-function-list))) (mapcar 'elp-reset-function list))) |