Mercurial > emacs
changeset 72524:49a6e184d20a
(Fswitch_to_buffer): Fix previous change.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 25 Aug 2006 21:10:26 +0000 |
parents | 85d27b00d6b0 |
children | 0efa7806a3b9 |
files | src/buffer.c |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/buffer.c Fri Aug 25 21:08:44 2006 +0000 +++ b/src/buffer.c Fri Aug 25 21:10:26 2006 +0000 @@ -1685,10 +1685,15 @@ if (EQ (buffer, Fwindow_buffer (selected_window))) { - if (NILP (norecord) && !EQ (buffer, XCDR (XCAR (Vbuffer_alist)))) + /* Basically a NOP. Avoid signalling an error in the case where + the selected window is dedicated, or a minibuffer. */ + + /* But do put this buffer at the front of the buffer list, + unless that has been inhibited. Note that even if + BUFFER is at the front of the main buffer-list already, + we still want to move it to the front of the frame's buffer list. */ + if (NILP (norecord)) record_buffer (buffer); - /* Basically a NOP. Avoid signalling an error if the selected window - is dedicated, or a minibuffer, ... */ return Fset_buffer (buffer); }