# HG changeset patch # User Richard M. Stallman # Date 863300651 0 # Node ID f379e219ed8eb61b4c1961745c126045749921b2 # Parent bd60d4318daf9f7bdd3dc2e66e852b79183f2ed4 (Fbury_buffer): If buffer is in selected window, remove it. Otherwise, remove it from other windows. diff -r bd60d4318daf -r f379e219ed8e src/buffer.c --- a/src/buffer.c Sat May 10 05:44:56 1997 +0000 +++ b/src/buffer.c Sat May 10 21:44:11 1997 +0000 @@ -1534,9 +1534,6 @@ if (NILP (buffer)) { XSETBUFFER (buffer, current_buffer); - - /* If we're burying the current buffer, unshow it. */ - Fswitch_to_buffer (Fother_buffer (buffer, Qnil), Qnil); } else { @@ -1548,6 +1545,13 @@ buffer = buf1; } + /* Unshow the buffer in the selected window, if it is there. */ + if (EQ (XWINDOW (selected_window)->buffer, buffer)) + Fswitch_to_buffer (Fother_buffer (buffer, Qnil), Qnil); + /* Otherwise, unshow it in other frames. */ + else + Freplace_buffer_in_windows (buffer); + /* Move buffer to the end of the buffer list. */ { register Lisp_Object aelt, link;