diff options
author | Chong Yidong <[email protected]> | 2011-09-13 11:33:16 -0400 |
---|---|---|
committer | Chong Yidong <[email protected]> | 2011-09-13 11:33:16 -0400 |
commit | ef8ef9fb80786849815c5142ec5319fba77ecd9f (patch) | |
tree | 526dfe6555c02aeb22e4cd4e61d55150ce78238c | |
parent | b2cba41ecdc954c6dc01567e279c969aa9710239 (diff) |
* lisp/window.el (window-deletable-p): Never delete last frame on a terminal.
* src/frame.c (Fother_visible_frames_p): Function deleted.
-rw-r--r-- | lisp/ChangeLog | 5 | ||||
-rw-r--r-- | lisp/window.el | 20 | ||||
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/frame.c | 12 |
4 files changed, 22 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5cb76a1394..6a315d9751 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-09-13 Chong Yidong <[email protected]> + + * window.el (window-deletable-p): Never delete the last frame on a + given terminal. + 2011-09-13 Glenn Morris <[email protected]> * help.el (describe-key-briefly): Copy previous standard-output change. diff --git a/lisp/window.el b/lisp/window.el index e60cc4768b..58b023163b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -2312,13 +2312,19 @@ its buffer or has no previous buffer to show instead." buffer)))))) (cond ((frame-root-window-p window) - (when (and (or force dedicated - (and (not prev) (memq window-auto-delete '(t frame)))) - (other-visible-frames-p frame)) - ;; We can delete WINDOW's frame if (1) either FORCE is non-nil, - ;; WINDOW is dedicated to its buffer, or there are no previous - ;; buffers to show and (2) there are other visible frames left. - 'frame)) + ;; We can delete the frame if (1) FORCE is non-nil, WINDOW is + ;; dedicated to its buffer, or there are no previous buffers to + ;; show and (2) there are other visible frames on this terminal. + (and (or force dedicated + (and (not prev) (memq window-auto-delete '(t frame)))) + ;; Are there visible frames on the same terminal? + (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)) ((and (or force dedicated (and (not prev) (memq window-auto-delete '(t window)))) (or ignore-window-parameters diff --git a/src/ChangeLog b/src/ChangeLog index 0cf5ee725d..9e04455102 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-09-13 Chong Yidong <[email protected]> + + * frame.c (Fother_visible_frames_p): Function deleted. + 2011-09-12 Eli Zaretskii <[email protected]> * indent.c (compute_motion): Process display vector front to back diff --git a/src/frame.c b/src/frame.c index cf866e6657..112f102a1f 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1155,17 +1155,6 @@ other_visible_frames (FRAME_PTR f) return 1; } -DEFUN ("other-visible-frames-p", Fother_visible_frames_p, Sother_visible_frames_p, 0, 1, 0, - doc: /* Return t if there are other visible frames beside FRAME. -FRAME defaults to the selected frame. */) - (Lisp_Object frame) -{ - if (NILP (frame)) - frame = selected_frame; - CHECK_LIVE_FRAME (frame); - return other_visible_frames (XFRAME (frame)) ? Qt : Qnil; -} - /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME unconditionally. x_connection_closed and delete_terminal use this. Any other value of FORCE implements the semantics @@ -4475,7 +4464,6 @@ automatically. See also `mouse-autoselect-window'. */); defsubr (&Sframe_list); defsubr (&Snext_frame); defsubr (&Sprevious_frame); - defsubr (&Sother_visible_frames_p); defsubr (&Sdelete_frame); defsubr (&Smouse_position); defsubr (&Smouse_pixel_position); |