[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CVS Emacs list-buffer-noselect calls set-window-buffer, displays eve

From: Kevin Rodgers
Subject: Re: CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly!
Date: Fri, 03 Sep 2004 12:54:51 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

Stephan Stahl wrote:
> That line in list-buffer-noselect was introduced by a patch from me.
> Revision 1.67: (list-buffers-noselect): Append the buffer's process status
> to its mode name.
> If it is removed the following code in buff-menu.el will not work correctly:
> mode (progn
>        (set-window-buffer (selected-window) buffer)
>        (concat (format-mode-line mode-name)
>                (if mode-line-process
>                    (format-mode-line mode-line-process))))
>                    file (buffer-file-name)))
> format-mode-line will only work correctly if it is called while the buffer
> is selected.

But you have not only selected the buffer, you have modified the
buffer-window correspondence, and the doc string hints that you might
have forced a redisplay:

,----[ C-h f set-window-buffer RET ]
| set-window-buffer is a built-in function.
| (set-window-buffer WINDOW BUFFER)
| Make WINDOW display BUFFER as its contents.
| BUFFER can be a buffer or buffer name.

Does replacing (progn (set-window-buffer ...) ...) with
(with-current-buffer (set-buffer buffer) ...) work?

Kevin Rodgers

reply via email to

[Prev in Thread] Current Thread [Next in Thread]