mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 08:11:05 -08:00
(Fbury_buffer): If buffer is in selected window, remove it.
Otherwise, remove it from other windows.
This commit is contained in:
parent
e2b307720f
commit
435bc8400e
1 changed files with 7 additions and 3 deletions
10
src/buffer.c
10
src/buffer.c
|
|
@ -1534,9 +1534,6 @@ selected window if it is displayed there.")
|
|||
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 @@ selected window if it is displayed there.")
|
|||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue