[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 76bec09a42 1/2: Remove edebug props in edebug-remove-instrumentat
From: |
Lars Ingebrigtsen |
Subject: |
master 76bec09a42 1/2: Remove edebug props in edebug-remove-instrumentation |
Date: |
Mon, 12 Sep 2022 06:57:49 -0400 (EDT) |
branch: master
commit 76bec09a42de5da8876b5cc6c905dac2d55241a5
Author: Arthur Miller <arthur.miller@live.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Remove edebug props in edebug-remove-instrumentation
* lisp/emacs-lisp/edebug.el (edebug--strip-plist): New function
(bug#51026).
(edebug-remove-instrumentation): Use it to remove pros added while
running edebug.
---
lisp/emacs-lisp/edebug.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el
index c916ec431e..31c05057bf 100644
--- a/lisp/emacs-lisp/edebug.el
+++ b/lisp/emacs-lisp/edebug.el
@@ -4573,6 +4573,12 @@ With prefix argument, make it a temporary breakpoint."
(was-macro `(macro . ,unwrapped))
(t unwrapped))))))
+(defun edebug--strip-plist (symbol)
+ "Remove edebug related properties from plist for SYMBOL."
+ (dolist (prop '( edebug edebug-behavior edebug-coverage
+ edebug-freq-count ghost-edebug))
+ (cl-remprop symbol prop)))
+
(defun edebug-remove-instrumentation (functions)
"Remove Edebug instrumentation from FUNCTIONS.
Interactively, the user is prompted for the function to remove
@@ -4604,6 +4610,7 @@ instrumentation for, defaulting to all functions."
(dolist (symbol functions)
(when-let ((unwrapped
(edebug--unwrap*-symbol-function symbol)))
+ (edebug--strip-plist symbol)
(defalias symbol unwrapped)))
(message "Removed edebug instrumentation from %s"
(mapconcat #'symbol-name functions ", ")))