diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/buffer.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/buffer.c b/src/buffer.c index f6c45852b51..81ea51b357a 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -1685,10 +1685,15 @@ the window-buffer correspondences. */) | |||
| 1685 | 1685 | ||
| 1686 | if (EQ (buffer, Fwindow_buffer (selected_window))) | 1686 | if (EQ (buffer, Fwindow_buffer (selected_window))) |
| 1687 | { | 1687 | { |
| 1688 | if (NILP (norecord) && !EQ (buffer, XCDR (XCAR (Vbuffer_alist)))) | 1688 | /* Basically a NOP. Avoid signalling an error in the case where |
| 1689 | the selected window is dedicated, or a minibuffer. */ | ||
| 1690 | |||
| 1691 | /* But do put this buffer at the front of the buffer list, | ||
| 1692 | unless that has been inhibited. Note that even if | ||
| 1693 | BUFFER is at the front of the main buffer-list already, | ||
| 1694 | we still want to move it to the front of the frame's buffer list. */ | ||
| 1695 | if (NILP (norecord)) | ||
| 1689 | record_buffer (buffer); | 1696 | record_buffer (buffer); |
| 1690 | /* Basically a NOP. Avoid signalling an error if the selected window | ||
| 1691 | is dedicated, or a minibuffer, ... */ | ||
| 1692 | return Fset_buffer (buffer); | 1697 | return Fset_buffer (buffer); |
| 1693 | } | 1698 | } |
| 1694 | 1699 | ||