From 957dfc79d7f8f49c0e357aa717d242b14586a8b7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 6 May 2024 14:33:43 -0400 Subject: [PATCH] edebug.el: Fix `edebug-remove-instrumentation` (bug#70791) * lisp/emacs-lisp/edebug.el (edebug-unwrap*): Traverse interpreted functions. (cherry picked from commit f63615208adf2852b9384fe817e930588920a894) --- lisp/emacs-lisp/edebug.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 94e5a485bd0..3c238baafc6 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1313,6 +1313,12 @@ infinite loops when the code/environment contains a circular object.") (aref sexp 0) (aref sexp 1) (vconcat (mapcar #'edebug-unwrap* (aref sexp 2))) (nthcdr 3 (append sexp ())))) + ((interpreted-function-p sexp) + (make-interpreted-closure + (aref sexp 0) (mapcar #'edebug-unwrap* (aref sexp 1)) + (mapcar (lambda (x) (if (consp x) (cons (car x) (edebug-unwrap* (cdr x))) x)) + (aref sexp 2)) + (documentation sexp 'raw) (interactive-form sexp))) (t sexp))) -- 2.39.5