>From 057a4278bf0b8c8a8985850b505f0a1addd8156f Mon Sep 17 00:00:00 2001 From: Arthur Miller Date: Tue, 5 Oct 2021 09:17:20 +0200 Subject: [PATCH] Clean edebug props on instrumentation removal * lisp/emacs-lisp/edebug.el (edebug--strip-plist): New function. (edebug-remove-instrumentation): Added call to 'edebug--strip-plist'. --- lisp/emacs-lisp/edebug.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index a38c8bd5ca..da8a3f1eb8 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4529,6 +4529,13 @@ edebug--unwrap*-symbol-function (was-macro `(macro . ,unwrapped)) (t unwrapped)))))) +(defun edebug--strip-plist (symbol) + "Remove edebug related properties from SYMBOL's plist." + (dolist (prop '(edebug edebug-behavior edebug-coverage + edebug-form-spec 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 @@ -4560,6 +4567,7 @@ edebug-remove-instrumentation (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 ", "))) -- 2.33.0