diff options
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/buffer.c b/src/buffer.c index baa7f6104d4..c155ec172c9 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1558,6 +1558,9 @@ selected window if it is displayed there.") | |||
| 1558 | if (NILP (buffer)) | 1558 | if (NILP (buffer)) |
| 1559 | { | 1559 | { |
| 1560 | XSETBUFFER (buffer, current_buffer); | 1560 | XSETBUFFER (buffer, current_buffer); |
| 1561 | |||
| 1562 | /* If we're burying the current buffer, unshow it. */ | ||
| 1563 | Fswitch_to_buffer (Fother_buffer (buffer, Qnil), Qnil); | ||
| 1561 | } | 1564 | } |
| 1562 | else | 1565 | else |
| 1563 | { | 1566 | { |
| @@ -1569,13 +1572,6 @@ selected window if it is displayed there.") | |||
| 1569 | buffer = buf1; | 1572 | buffer = buf1; |
| 1570 | } | 1573 | } |
| 1571 | 1574 | ||
| 1572 | /* Unshow the buffer in the selected window, if it is there. */ | ||
| 1573 | if (EQ (XWINDOW (selected_window)->buffer, buffer)) | ||
| 1574 | Fswitch_to_buffer (Fother_buffer (buffer, Qnil), Qnil); | ||
| 1575 | /* Otherwise, unshow it in other frames. */ | ||
| 1576 | else | ||
| 1577 | Freplace_buffer_in_windows (buffer); | ||
| 1578 | |||
| 1579 | /* Move buffer to the end of the buffer list. */ | 1575 | /* Move buffer to the end of the buffer list. */ |
| 1580 | { | 1576 | { |
| 1581 | register Lisp_Object aelt, link; | 1577 | register Lisp_Object aelt, link; |