Commit e20e4a48 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(edebug-kill-buffer): New function.

(edebug-mode): Add the hook.
(edebug-recursive-edit): Remove the hook on exiting.
parent dad757bc
......@@ -2939,6 +2939,7 @@ MSG is printed after `::::} '."
(edebug-overlay-arrow))
(setq buffer-read-only edebug-buffer-read-only)
(use-local-map edebug-outside-map)
(remove-hook 'kill-buffer-hook 'edebug-kill-buffer t)
)
;; gotta have a buffer to let its buffer local variables be set
(get-buffer-create " bogus edebug buffer"))
......@@ -3942,8 +3943,18 @@ edebug-on-signal
edebug-unwrap-results
edebug-global-break-condition
"
;; If the user kills the buffer in which edebug is currently active,
;; exit to top level, because the edebug command loop can't usefully
;; continue running in such a case.
(add-hook 'kill-buffer-hook 'edebug-kill-buffer nil t)
(use-local-map edebug-mode-map))
(defun edebug-kill-buffer ()
"Used on `kill-buffer-hook' when Edebug is operating in a buffer of Lisp code."
(let (kill-buffer-hook)
(kill-buffer (current-buffer)))
(top-level))
;;; edebug eval list mode
;; A list of expressions and their evaluations is displayed in *edebug*.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment