emacs-devel
[Top][All Lists]
Advanced

[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: Richard Stallman
Subject: Re: CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly!
Date: Sun, 05 Sep 2004 01:12:50 -0400

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))




reply via email to

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