Mercurial > emacs
changeset 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 | bd60d4318daf |
children | 8b30ef18c480 |
files | src/buffer.c |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
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;