diff options
| author | Martin Rudalics | 2012-10-03 10:50:49 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2012-10-03 10:50:49 +0200 |
| commit | 96ef9ccd1b0a28c774ad5b9ffbfb811de540eb30 (patch) | |
| tree | cc5254415cf7285236159ec562d601d3acac7b89 | |
| parent | 2e566ecb82ea16ee0f38cdf1af443e5d994735c6 (diff) | |
| download | emacs-96ef9ccd1b0a28c774ad5b9ffbfb811de540eb30.tar.gz emacs-96ef9ccd1b0a28c774ad5b9ffbfb811de540eb30.zip | |
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).
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 11 |
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 34afcee4b1c..1b115e5c5d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2012-10-03 Martin Rudalics <rudalics@gmx.at> | 1 | 2012-10-03 Martin Rudalics <rudalics@gmx.at> |
| 2 | 2 | ||
| 3 | * menu-bar.el (kill-this-buffer): Don't do anything when | ||
| 4 | `menu-frame' is not alive or visible (Bug#8184). | ||
| 5 | |||
| 3 | * emacs-lisp/debug.el (debug): When quitting the debugger window | 6 | * emacs-lisp/debug.el (debug): When quitting the debugger window |
| 4 | restore current buffer (Bug#12502). | 7 | restore current buffer (Bug#12502). |
| 5 | 8 | ||
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 010b4edfb05..88e59eff86b 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1812,9 +1812,14 @@ for the definition of the menu frame." | |||
| 1812 | When called in the minibuffer, get out of the minibuffer | 1812 | When called in the minibuffer, get out of the minibuffer |
| 1813 | using `abort-recursive-edit'." | 1813 | using `abort-recursive-edit'." |
| 1814 | (interactive) | 1814 | (interactive) |
| 1815 | (if (menu-bar-non-minibuffer-window-p) | 1815 | (cond |
| 1816 | (kill-buffer (current-buffer)) | 1816 | ;; Don't do anything when `menu-frame' is not alive or visible |
| 1817 | (abort-recursive-edit))) | 1817 | ;; (Bug#8184). |
| 1818 | ((not (menu-bar-menu-frame-live-and-visible-p))) | ||
| 1819 | ((menu-bar-non-minibuffer-window-p) | ||
| 1820 | (kill-buffer (current-buffer))) | ||
| 1821 | (t | ||
| 1822 | (abort-recursive-edit)))) | ||
| 1818 | 1823 | ||
| 1819 | (defun kill-this-buffer-enabled-p () | 1824 | (defun kill-this-buffer-enabled-p () |
| 1820 | "Return non-nil if the `kill-this-buffer' menu item should be enabled." | 1825 | "Return non-nil if the `kill-this-buffer' menu item should be enabled." |