Mercurial > emacs
changeset 7647:d93dff6fbc73
(window_loop, UNSHOW_BUFFER case):
Put prev change in #ifdef MULTI_FRAME.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 23 May 1994 05:41:58 +0000 |
parents | de2c4334fad4 |
children | 2e85e48d42da |
files | src/window.c |
diffstat | 1 files changed, 17 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/window.c Mon May 23 05:38:20 1994 +0000 +++ b/src/window.c Mon May 23 05:41:58 1994 +0000 @@ -1265,14 +1265,27 @@ { /* Find another buffer to show in this window. */ Lisp_Object another_buffer; + FRAME_PTR f = XFRAME (WINDOW_FRAME (XWINDOW (w))); another_buffer = Fother_buffer (obj, Qnil); if (NILP (another_buffer)) another_buffer = Fget_buffer_create (build_string ("*scratch*")); - XWINDOW (w)->dedicated = Qnil; - Fset_window_buffer (w, another_buffer); - if (EQ (w, selected_window)) - Fset_buffer (XWINDOW (w)->buffer); +#ifdef MULTI_FRAME + /* If this window is dedicated, and in a frame of its own, + kill the frame. */ + if (EQ (w, FRAME_ROOT_WINDOW (f)) + && XWINDOW (w)->dedicated + && other_visible_frames (f)) + Fdelete_frame (WINDOW_FRAME (XWINDOW (w)), Qnil); + else +#endif + { + /* Otherwise show a different buffer in the window. */ + XWINDOW (w)->dedicated = Qnil; + Fset_window_buffer (w, another_buffer); + if (EQ (w, selected_window)) + Fset_buffer (XWINDOW (w)->buffer); + } } break; }