summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/window.el13
2 files changed, 8 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f543bd0eb03..73384823c48 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2011-09-13 Chong Yidong <cyd@stupidchicken.com>
+
+ * window.el (window-deletable-p): Use next-frame.
+
2011-09-13 Martin Rudalics <rudalics@gmx.at>
* window.el (window-auto-delete): Remove.
diff --git a/lisp/window.el b/lisp/window.el
index 26d29db4993..3a229a4e447 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2274,15 +2274,10 @@ frame."
(buffer (window-buffer window)))
(cond
((frame-root-window-p window)
- ;; WINDOW's frame can be deleted only if there are other visible
- ;; frames on the same terminal.
- (when (let ((terminal (frame-terminal frame)))
- (catch 'found
- (dolist (f (delq frame (frame-list)))
- (and (eq terminal (frame-terminal f))
- (frame-visible-p f)
- (throw 'found t)))))
- 'frame))
+ ;; WINDOW's frame can be deleted only if there are other frames
+ ;; on the same terminal.
+ (unless (eq frame (next-frame frame 0))
+ 'frame))
((or ignore-window-parameters
(not (eq (window-parameter window 'window-side) 'none))
(and parent (eq (window-parameter parent 'window-side) 'none)))