aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c
index 343686d43f1..1b5a66b0986 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1534,9 +1534,6 @@ selected window if it is displayed there.")
1534 if (NILP (buffer)) 1534 if (NILP (buffer))
1535 { 1535 {
1536 XSETBUFFER (buffer, current_buffer); 1536 XSETBUFFER (buffer, current_buffer);
1537
1538 /* If we're burying the current buffer, unshow it. */
1539 Fswitch_to_buffer (Fother_buffer (buffer, Qnil), Qnil);
1540 } 1537 }
1541 else 1538 else
1542 { 1539 {
@@ -1548,6 +1545,13 @@ selected window if it is displayed there.")
1548 buffer = buf1; 1545 buffer = buf1;
1549 } 1546 }
1550 1547
1548 /* Unshow the buffer in the selected window, if it is there. */
1549 if (EQ (XWINDOW (selected_window)->buffer, buffer))
1550 Fswitch_to_buffer (Fother_buffer (buffer, Qnil), Qnil);
1551 /* Otherwise, unshow it in other frames. */
1552 else
1553 Freplace_buffer_in_windows (buffer);
1554
1551 /* Move buffer to the end of the buffer list. */ 1555 /* Move buffer to the end of the buffer list. */
1552 { 1556 {
1553 register Lisp_Object aelt, link; 1557 register Lisp_Object aelt, link;