From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: CVS Emacs list-buffer-noselect calls set-window-buffer, displays every buffer briefly! Date: Sun, 05 Sep 2004 01:12:50 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1094361195 3420 80.91.224.253 (5 Sep 2004 05:13:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Sep 2004 05:13:15 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 05 07:13:10 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C3pKw-0001OW-00 for ; Sun, 05 Sep 2004 07:13:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C3pQ3-0000Cv-1L for ged-emacs-devel@m.gmane.org; Sun, 05 Sep 2004 01:18:27 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C3pPv-0000Ch-6x for emacs-devel@gnu.org; Sun, 05 Sep 2004 01:18:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C3pPu-0000CV-Ms for emacs-devel@gnu.org; Sun, 05 Sep 2004 01:18:18 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C3pPu-0000CL-JD for emacs-devel@gnu.org; Sun, 05 Sep 2004 01:18:18 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C3pKd-00088h-7y for emacs-devel@gnu.org; Sun, 05 Sep 2004 01:12:51 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1C3pKc-0004DC-LG; Sun, 05 Sep 2004 01:12:50 -0400 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:26791 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:26791 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))