summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2012-12-13 19:15:42 +0100
committerJuanma Barranquero <lekktu@gmail.com>2012-12-13 19:15:42 +0100
commitce0440ff9661d84a7632379923af8449986ca56e (patch)
tree589c6ece3e27bda8592efd33c487f9bb7b6b2070 /lisp/emacs-lisp
parent893f52d89586fe46009ee077858f6ecd847e3e09 (diff)
downloademacs-ce0440ff9661d84a7632379923af8449986ca56e.tar.gz
emacs-ce0440ff9661d84a7632379923af8449986ca56e.tar.bz2
emacs-ce0440ff9661d84a7632379923af8449986ca56e.zip
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/edebug.el9
1 files changed, 3 insertions, 6 deletions
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)