unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly!
@ 2004-09-02 18:59 Francis Litterio
  2004-09-02 19:57 ` Stefan Monnier
  0 siblings, 1 reply; 26+ messages in thread
From: Francis Litterio @ 2004-09-02 18:59 UTC (permalink / raw)


Revision 1.67 of lisp/buff-menu.el changed list-buffers-noselect so that
it now does

        (set-window-buffer (selected-window) buffer)

once for every buffer while building the buffer menu.  On my Windows XP
machine, this makes Emacs briefely display every buffer for a fraction
of a section before displaying the buffer menu.  Very annoying!

This patch fixes it without (apparently) causing a loss of
functionality:

--- buff-menu.el        02 Sep 2004 10:36:13 -0400      1.67
+++ buff-menu.el        02 Sep 2004 15:05:04 -0400      
@@ -641,7 +641,6 @@
                       (save-window-excursion
                         (setq name (buffer-name)
                               mode (progn
-                                     (set-window-buffer (selected-window) buffer)
                                      (concat (format-mode-line mode-name)
                                              (if mode-line-process
                                                  (format-mode-line mode-line-process))))

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly!
@ 2004-09-05  5:12 Richard Stallman
  2004-09-07 15:42 ` Francis Litterio
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: Richard Stallman @ 2004-09-05  5:12 UTC (permalink / raw)


This patch adds a BUFFER argument to format-mode-line, and should
make it possible to avoid calling set-window-buffer in that loop.

However, I still think we should find out why redisplay
happens inside that loop, since in all appearance, there should
be no redisplay.


*** xdisp.c	03 Sep 2004 16:38:31 -0400	1.904
--- xdisp.c	05 Sep 2004 01:06:54 -0400	
***************
*** 15776,15790 ****
  
  
  DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,
!        0, 3, 0,
         doc: /* Return the mode-line of selected window as a string.
  First optional arg FORMAT specifies a different format string (see
  `mode-line-format' for details) to use.  If FORMAT is t, return
  the buffer's header-line.  Second optional arg WINDOW specifies a
  different window to use as the context for the formatting.
! If third optional arg NO-PROPS is non-nil, string is not propertized.  */)
!      (format, window, no_props)
!      Lisp_Object format, window, no_props;
  {
    struct it it;
    int len;
--- 15776,15791 ----
  
  
  DEFUN ("format-mode-line", Fformat_mode_line, Sformat_mode_line,
!        0, 4, 0,
         doc: /* Return the mode-line of selected window as a string.
  First optional arg FORMAT specifies a different format string (see
  `mode-line-format' for details) to use.  If FORMAT is t, return
  the buffer's header-line.  Second optional arg WINDOW specifies a
  different window to use as the context for the formatting.
! If third optional arg NO-PROPS is non-nil, string is not propertized.
! Fourth optional arg BUFFER specifies which buffer to use.  */)
!   (format, window, no_props, buffer)
!      Lisp_Object format, window, no_props, buffer;
  {
    struct it it;
    int len;
***************
*** 15796,15807 ****
      window = selected_window;
    CHECK_WINDOW (window);
    w = XWINDOW (window);
-   CHECK_BUFFER (w->buffer);
  
!   if (XBUFFER (w->buffer) != current_buffer)
      {
        old_buffer = current_buffer;
!       set_buffer_internal_1 (XBUFFER (w->buffer));
      }
  
    if (NILP (format) || EQ (format, Qt))
--- 15797,15812 ----
      window = selected_window;
    CHECK_WINDOW (window);
    w = XWINDOW (window);
  
!   if (NILP (buffer))
!     buffer = w->buffer;
! 
!   CHECK_BUFFER (buffer);
! 
!   if (XBUFFER (buffer) != current_buffer)
      {
        old_buffer = current_buffer;
!       set_buffer_internal_1 (XBUFFER (buffer));
      }
  
    if (NILP (format) || EQ (format, Qt))

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2004-09-09 16:13 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-02 18:59 CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly! Francis Litterio
2004-09-02 19:57 ` Stefan Monnier
2004-09-02 20:07   ` Francis Litterio
2004-09-02 20:48     ` Stefan Monnier
2004-09-03  6:27       ` Stephan Stahl
2004-09-03 11:49         ` Francis Litterio
2004-09-04  3:28           ` Richard Stallman
2004-09-03 18:54         ` Kevin Rodgers
2004-09-04  8:42           ` Stephan Stahl
2004-09-04 19:40             ` Francis Litterio
2004-09-04 22:12           ` Richard Stallman
2004-09-03 19:15       ` Francis Litterio
  -- strict thread matches above, loose matches on Subject: below --
2004-09-05  5:12 Richard Stallman
2004-09-07 15:42 ` Francis Litterio
2004-09-08  0:22   ` Richard Stallman
2004-09-08 14:36 ` Francis Litterio
2004-09-09  4:02   ` Richard Stallman
2004-09-09 15:46     ` Francis Litterio
2004-09-08 15:02 ` Francis Litterio
2004-09-08 16:20   ` Kevin Rodgers
2004-09-08 18:21     ` Francis Litterio
2004-09-09  4:03       ` Richard Stallman
2004-09-09  8:23       ` Stephan Stahl
2004-09-09 15:41         ` Francis Litterio
2004-09-09 16:13           ` Stephan Stahl
2004-09-09 15:45         ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).