Mercurial > emacs
diff src/buffer.c @ 17735:f379e219ed8e
(Fbury_buffer): If buffer is in selected window, remove it.
Otherwise, remove it from other windows.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sat, 10 May 1997 21:44:11 +0000 |
parents | 7ed40081342f |
children | 7c256846be75 |
line wrap: on
line diff
--- 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;