[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: switch-to-buffer incompatible behavior with Emacs 21
From: |
Kim F. Storm |
Subject: |
Re: switch-to-buffer incompatible behavior with Emacs 21 |
Date: |
Fri, 25 Aug 2006 10:25:10 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
Nick Roberts <address@hidden> writes:
> > I think this fix is more correct. Does it give good results?
>
> I've already committed a similar fix (after Kim and Stefan agreed with it).
On second thought, I think RMS' patch is better ... as it doesn't assume that
Vbuffer_alist is well formatted. record_buffer will handle this correctly.
And there is no reason to optimize the code for this particular case.
>
> *** buffer.c 22 Aug 2006 10:59:44 -0400 1.507
> --- buffer.c 24 Aug 2006 10:35:16 -0400
> ***************
> *** 1684,1692 ****
> char *err;
>
> if (EQ (buffer, Fwindow_buffer (selected_window)))
> ! /* Basically a NOP. Avoid signalling an error if the selected window
> ! is dedicated, or a minibuffer, ... */
> ! return Fset_buffer (buffer);
>
> err = no_switch_window (selected_window);
> if (err) error (err);
> --- 1684,1699 ----
> char *err;
>
> if (EQ (buffer, Fwindow_buffer (selected_window)))
> ! {
> ! /* 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. */
> ! if (NILP (norecord))
> ! record_buffer (buffer);
> ! return Fset_buffer (buffer);
> ! }
--
Kim F. Storm <address@hidden> http://www.cua.dk
Re: switch-to-buffer incompatible behavior with Emacs 21, Richard Stallman, 2006/08/25