diff options
| author | Richard M. Stallman | 1997-05-10 21:44:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-05-10 21:44:11 +0000 |
| commit | 435bc8400e6cde55bb92302aff9f82d75a3da103 (patch) | |
| tree | 451e82af3852f0be00f2683207fe04e29ecdd8b0 /src/buffer.c | |
| parent | e2b307720fe09759adfb2b880b39022b80a0e644 (diff) | |
| download | emacs-435bc8400e6cde55bb92302aff9f82d75a3da103.tar.gz emacs-435bc8400e6cde55bb92302aff9f82d75a3da103.zip | |
(Fbury_buffer): If buffer is in selected window, remove it.
Otherwise, remove it from other windows.
Diffstat (limited to 'src/buffer.c')
| -rw-r--r-- | src/buffer.c | 10 |
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; |