Index: src/window.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/window.c,v retrieving revision 1.41.2.32 diff -u -r1.41.2.32 window.c --- window.c 2000/01/26 12:34:03 1.41.2.32 +++ window.c 2000/01/28 20:04:59 @@ -2605,7 +2605,7 @@ new_buffer = Fother_buffer (obj, Qnil, Qnil); if (NILP (new_buffer)) new_buffer = Fget_buffer_create (QSscratch); - Fset_window_buffer (w, new_buffer); + Fset_window_buffer (w, new_buffer, Qnil); if (EQ (w, Fselected_window (Qnil))) Fset_buffer (p->buffer); } @@ -2677,7 +2677,7 @@ /* Otherwise show a different buffer in the window. */ p->dedicated = Qnil; - Fset_window_buffer (w, another_buffer); + Fset_window_buffer (w, another_buffer, Qnil); if (EQ (w, Fselected_window (Qnil))) Fset_buffer (p->buffer); } @@ -3138,11 +3138,14 @@ static int window_select_count; -DEFUN ("set-window-buffer", Fset_window_buffer, 2, 2, 0, /* +DEFUN ("set-window-buffer", Fset_window_buffer, 2, 3, 0, /* Make WINDOW display BUFFER as its contents. BUFFER can be a buffer or buffer name. + +With non-nil optional argument `norecord', do not modify the +global or per-frame buffer ordering. */ - (window, buffer)) + (window, buffer, norecord)) { Lisp_Object tem; struct window *w = decode_window (window); @@ -3201,6 +3204,9 @@ recompute_all_cached_specifiers_in_window (w); if (EQ (window, Fselected_window (Qnil))) { + if (NILP (norecord)) + Frecord_buffer (buffer); + Fset_buffer (buffer); } return Qnil; @@ -3503,7 +3509,7 @@ /* do this last (after the window is completely initialized and the mirror-dirty flag is set) so that specifier recomputation caused as a result of this will work properly and not abort. */ - Fset_window_buffer (new, o->buffer); + Fset_window_buffer (new, o->buffer, Qt); return new; } Index: src/frame.c =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/frame.c,v retrieving revision 1.37.2.15 diff -u -r1.37.2.15 frame.c --- frame.c 2000/01/24 07:33:35 1.37.2.15 +++ frame.c 2000/01/28 20:05:10 @@ -226,7 +226,7 @@ a space), try to find another one. */ if (string_char (XSTRING (Fbuffer_name (buf)), 0) == ' ') buf = Fother_buffer (buf, Qnil, Qnil); - Fset_window_buffer (root_window, buf); + Fset_window_buffer (root_window, buf, Qnil); } return f; @@ -249,7 +249,7 @@ f->has_minibuffer = 1; XWINDOW (mini_window)->buffer = Qt; - Fset_window_buffer (mini_window, Vminibuffer_zero); + Fset_window_buffer (mini_window, Vminibuffer_zero, Qt); } /* Make a frame using a separate minibuffer window on another frame. @@ -286,7 +286,7 @@ /* Install the chosen minibuffer window, with proper buffer. */ store_minibuf_frame_prop (f, mini_window); - Fset_window_buffer (mini_window, Vminibuffer_zero); + Fset_window_buffer (mini_window, Vminibuffer_zero, Qt); } /* Make a frame containing only a minibuffer window. */ @@ -316,7 +316,7 @@ /* Put the proper buffer in that window. */ - Fset_window_buffer (mini_window, Vminibuffer_zero); + Fset_window_buffer (mini_window, Vminibuffer_zero, Qt); } static Lisp_Object @@ -1525,7 +1525,7 @@ { struct frame *sel_frame = selected_frame (); Fset_window_buffer (sel_frame->minibuffer_window, - XWINDOW (minibuf_window)->buffer); + XWINDOW (minibuf_window)->buffer, Qt); minibuf_window = sel_frame->minibuffer_window; /* If the dying minibuffer window was selected, @@ -1931,7 +1931,7 @@ if (EQ (f->minibuffer_window, minibuf_window)) { Fset_window_buffer (sel_frame->minibuffer_window, - XWINDOW (minibuf_window)->buffer); + XWINDOW (minibuf_window)->buffer, Qt); minibuf_window = sel_frame->minibuffer_window; } @@ -1957,7 +1957,7 @@ if (EQ (f->minibuffer_window, minibuf_window)) { Fset_window_buffer (sel_frame->minibuffer_window, - XWINDOW (minibuf_window)->buffer); + XWINDOW (minibuf_window)->buffer, Qt); minibuf_window = sel_frame->minibuffer_window; } Index: src/window.h =================================================================== RCS file: /usr/CVSroot/XEmacs/xemacs/src/window.h,v retrieving revision 1.13.2.7 diff -u -r1.13.2.7 window.h --- window.h 2000/01/22 12:04:21 1.13.2.7 +++ window.h 2000/01/28 20:05:12 @@ -310,7 +310,7 @@ EXFUN (Freplace_buffer_in_windows, 1); EXFUN (Fselect_window, 2); EXFUN (Fselected_window, 1); -EXFUN (Fset_window_buffer, 2); +EXFUN (Fset_window_buffer, 3); EXFUN (Fset_window_hscroll, 2); EXFUN (Fset_window_point, 2); EXFUN (Fset_window_start, 3);