# HG changeset patch # User Richard M. Stallman # Date 1156540226 0 # Node ID 49a6e184d20a773811c0404c73b99d01ef307fb9 # Parent 85d27b00d6b0bd0128290de1b0ed1b193d56a15d (Fswitch_to_buffer): Fix previous change. diff -r 85d27b00d6b0 -r 49a6e184d20a src/buffer.c --- 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); }