[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: Francis Litterio
Subject: Re: CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly!
Date: Wed, 08 Sep 2004 14:21:46 -0400
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (windows-nt)

Kevin Rodgers wrote:

> Francis Litterio wrote:

>  > I think this solves the puzzle, though we have to decide if
>  > list-buffers-noselect should continue to call set-window-buffer, given
>  > that set-window-buffer calls the hooks on window-scroll-functions.
> Would it be reasonable for list-buffers-noselect to let-bind
> window-scroll-functions to nil?

RMS's patch adds a BUFFER argument to format-mode-line, which makes it
possible to avoid calling set-window-buffer in list-buffers-noselect, as

--- buff-menu.el        02 Sep 2004 10:36:13 -0400      1.67
+++ buff-menu.el        08 Sep 2004 14:32:06 -0400      
@@ -641,10 +641,10 @@
                         (setq name (buffer-name)
                               mode (progn
-                                     (set-window-buffer (selected-window) 
-                                     (concat (format-mode-line mode-name)
+                                     (concat (format-mode-line mode-name nil 
nil buffer)
                                              (if mode-line-process
-                                                 (format-mode-line 
+                                                 (format-mode-line 
mode-line-process nil nil
+                                                                   buffer))))
                               file (buffer-file-name)))
                        ;; Don't mention internal buffers.

That is probably the optimal solution.  I would also suggest changing
the docstring for set-window-buffer to mention that it runs the hooks on
window-scroll-functions.  This patch makes that change:

--- window.c    02 Sep 2004 10:37:48 -0400      1.477
+++ window.c    08 Sep 2004 14:25:44 -0400      
@@ -3057,7 +3057,9 @@
 Optional third arg KEEP-MARGINS non-nil means that WINDOW's current
 display margins, fringe widths, and scroll bar settings are maintained;
 the default is to reset these from BUFFER's local settings or the frame
-defaults.  */)
+This function calls the functions on the hook window-scroll-functions.  */)
      (window, buffer, keep_margins)
      register Lisp_Object window, buffer, keep_margins;

Hope this helps.
Francis Litterio
GPG and PGP public keys available on keyservers.

reply via email to

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