diff options
| author | Chong Yidong | 2011-09-13 11:33:16 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-09-13 11:33:16 -0400 |
| commit | ef8ef9fb80786849815c5142ec5319fba77ecd9f (patch) | |
| tree | 526dfe6555c02aeb22e4cd4e61d55150ce78238c | |
| parent | b2cba41ecdc954c6dc01567e279c969aa9710239 (diff) | |
| download | emacs-ef8ef9fb80786849815c5142ec5319fba77ecd9f.tar.gz emacs-ef8ef9fb80786849815c5142ec5319fba77ecd9f.zip | |
* 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 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 |
diff --git a/src/ChangeLog b/src/ChangeLog index 0cf5ee725d8..9e04455102d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2011-09-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * frame.c (Fother_visible_frames_p): Function deleted. | ||
| 4 | |||
| 1 | 2011-09-12 Eli Zaretskii <eliz@gnu.org> | 5 | 2011-09-12 Eli Zaretskii <eliz@gnu.org> |
| 2 | 6 | ||
| 3 | * indent.c (compute_motion): Process display vector front to back | 7 | * indent.c (compute_motion): Process display vector front to back |
diff --git a/src/frame.c b/src/frame.c index cf866e66578..112f102a1f2 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -1155,17 +1155,6 @@ other_visible_frames (FRAME_PTR f) | |||
| 1155 | return 1; | 1155 | return 1; |
| 1156 | } | 1156 | } |
| 1157 | 1157 | ||
| 1158 | DEFUN ("other-visible-frames-p", Fother_visible_frames_p, Sother_visible_frames_p, 0, 1, 0, | ||
| 1159 | doc: /* Return t if there are other visible frames beside FRAME. | ||
| 1160 | FRAME defaults to the selected frame. */) | ||
| 1161 | (Lisp_Object frame) | ||
| 1162 | { | ||
| 1163 | if (NILP (frame)) | ||
| 1164 | frame = selected_frame; | ||
| 1165 | CHECK_LIVE_FRAME (frame); | ||
| 1166 | return other_visible_frames (XFRAME (frame)) ? Qt : Qnil; | ||
| 1167 | } | ||
| 1168 | |||
| 1169 | /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME | 1158 | /* Delete FRAME. When FORCE equals Qnoelisp, delete FRAME |
| 1170 | unconditionally. x_connection_closed and delete_terminal use | 1159 | unconditionally. x_connection_closed and delete_terminal use |
| 1171 | this. Any other value of FORCE implements the semantics | 1160 | this. Any other value of FORCE implements the semantics |
| @@ -4475,7 +4464,6 @@ automatically. See also `mouse-autoselect-window'. */); | |||
| 4475 | defsubr (&Sframe_list); | 4464 | defsubr (&Sframe_list); |
| 4476 | defsubr (&Snext_frame); | 4465 | defsubr (&Snext_frame); |
| 4477 | defsubr (&Sprevious_frame); | 4466 | defsubr (&Sprevious_frame); |
| 4478 | defsubr (&Sother_visible_frames_p); | ||
| 4479 | defsubr (&Sdelete_frame); | 4467 | defsubr (&Sdelete_frame); |
| 4480 | defsubr (&Smouse_position); | 4468 | defsubr (&Smouse_position); |
| 4481 | defsubr (&Smouse_pixel_position); | 4469 | defsubr (&Smouse_pixel_position); |