From 94016b063faf3f69cf03d7ffa3eac1a15bad34c8 Mon Sep 17 00:00:00 2001 From: Arthur Miller Date: Wed, 6 Oct 2021 14:16:21 +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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index a38c8bd5ca..2489680bcb 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4529,6 +4529,12 @@ edebug--unwrap*-symbol-function (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 @@ -4560,6 +4566,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