From ce0440ff9661d84a7632379923af8449986ca56e Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Thu, 13 Dec 2012 19:15:42 +0100 Subject: [PATCH] lisp/emacs-lisp/edebug.el: Fix previous change. (edebug-unload-function): Make sure that unload-feature finishes even when aborting an ongoing edebug session. Also, do not worry about edebug-mode, unload-feature takes care of it. --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/edebug.el | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index fd6671cc29a..66af3378b14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2012-12-13 Juanma Barranquero + + * emacs-lisp/edebug.el (edebug-unload-function): Make sure that + unload-feature finishes even when aborting an ongoing edebug session. + Also, do not worry about edebug-mode, unload-feature takes care of it. + 2012-12-13 Andreas Schwab * net/tls.el (tls-program): Update customize type. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index c2ff81281a1..a9722796ecb 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4293,14 +4293,11 @@ With prefix argument, make it a temporary breakpoint." (defun edebug-unload-function () "Unload the Edebug source level debugger." (when edebug-active + (setq edebug-active nil) (unwind-protect (abort-recursive-edit) - (setq edebug-active nil) - (edebug-unload-function))) - (save-current-buffer - (dolist (buffer (buffer-list)) - (set-buffer buffer) - (when (eq major-mode 'edebug-mode) (emacs-lisp-mode)))) + ;; We still want to run unload-feature to completion + (run-with-idle-timer 0 nil #'(lambda () (unload-feature 'edebug))))) (remove-hook 'called-interactively-p-functions 'edebug--called-interactively-skip) (remove-hook 'cl-read-load-hooks 'edebug--require-cl-read) -- 2.39.2