diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/window.el | 20 |
2 files changed, 18 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cb76a1394a..6a315d9751e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-09-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * window.el (window-deletable-p): Never delete the last frame on a | ||
| 4 | given terminal. | ||
| 5 | |||
| 1 | 2011-09-13 Glenn Morris <rgm@gnu.org> | 6 | 2011-09-13 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * help.el (describe-key-briefly): Copy previous standard-output change. | 8 | * help.el (describe-key-briefly): Copy previous standard-output change. |
diff --git a/lisp/window.el b/lisp/window.el index e60cc4768b7..58b023163bd 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -2312,13 +2312,19 @@ its buffer or has no previous buffer to show instead." | |||
| 2312 | buffer)))))) | 2312 | buffer)))))) |
| 2313 | (cond | 2313 | (cond |
| 2314 | ((frame-root-window-p window) | 2314 | ((frame-root-window-p window) |
| 2315 | (when (and (or force dedicated | 2315 | ;; We can delete the frame if (1) FORCE is non-nil, WINDOW is |
| 2316 | (and (not prev) (memq window-auto-delete '(t frame)))) | 2316 | ;; dedicated to its buffer, or there are no previous buffers to |
| 2317 | (other-visible-frames-p frame)) | 2317 | ;; show and (2) there are other visible frames on this terminal. |
| 2318 | ;; We can delete WINDOW's frame if (1) either FORCE is non-nil, | 2318 | (and (or force dedicated |
| 2319 | ;; WINDOW is dedicated to its buffer, or there are no previous | 2319 | (and (not prev) (memq window-auto-delete '(t frame)))) |
| 2320 | ;; buffers to show and (2) there are other visible frames left. | 2320 | ;; Are there visible frames on the same terminal? |
| 2321 | 'frame)) | 2321 | (let ((terminal (frame-terminal frame))) |
| 2322 | (catch 'found | ||
| 2323 | (dolist (f (delq frame (frame-list))) | ||
| 2324 | (and (eq terminal (frame-terminal f)) | ||
| 2325 | (frame-visible-p f) | ||
| 2326 | (throw 'found t))))) | ||
| 2327 | 'frame)) | ||
| 2322 | ((and (or force dedicated | 2328 | ((and (or force dedicated |
| 2323 | (and (not prev) (memq window-auto-delete '(t window)))) | 2329 | (and (not prev) (memq window-auto-delete '(t window)))) |
| 2324 | (or ignore-window-parameters | 2330 | (or ignore-window-parameters |