Commit 96ef9ccd authored by Martin Rudalics's avatar Martin Rudalics

Have kill-this-buffer don't do anything when frame is not alive or visible (Bug#8184).

* menu-bar.el (kill-this-buffer): Don't do anything when
`menu-frame' is not alive or visible (Bug#8184).
parent 2e566ecb
2012-10-03 Martin Rudalics <rudalics@gmx.at>
* menu-bar.el (kill-this-buffer): Don't do anything when
`menu-frame' is not alive or visible (Bug#8184).
* emacs-lisp/debug.el (debug): When quitting the debugger window
restore current buffer (Bug#12502).
......
......@@ -1812,9 +1812,14 @@ for the definition of the menu frame."
When called in the minibuffer, get out of the minibuffer
using `abort-recursive-edit'."
(interactive)
(if (menu-bar-non-minibuffer-window-p)
(kill-buffer (current-buffer))
(abort-recursive-edit)))
(cond
;; Don't do anything when `menu-frame' is not alive or visible
;; (Bug#8184).
((not (menu-bar-menu-frame-live-and-visible-p)))
((menu-bar-non-minibuffer-window-p)
(kill-buffer (current-buffer)))
(t
(abort-recursive-edit))))
(defun kill-this-buffer-enabled-p ()
"Return non-nil if the `kill-this-buffer' menu item should be enabled."
......
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