# HG changeset patch # User Richard M. Stallman # Date 769671718 0 # Node ID d93dff6fbc73fbaaab2861d8531ba2b2b3414a6c # Parent de2c4334fad48b035e0918fdcd8f9fee522d2873 (window_loop, UNSHOW_BUFFER case): Put prev change in #ifdef MULTI_FRAME. diff -r de2c4334fad4 -r d93dff6fbc73 src/window.c --- 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; }