From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Old redisplay bug in xdisp.c, question about change Date: Tue, 25 Mar 2003 20:35:33 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <20030325193746.ZGJI3924.fep01-svc.swip.net@gaffa.gaia.swipnet.se> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1048621382 13334 80.91.224.249 (25 Mar 2003 19:43:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 25 Mar 2003 19:43:02 +0000 (UTC) Cc: "'emacs-devel@gnu.org'" Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue Mar 25 20:43:00 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18xuIJ-0003K7-00 for ; Tue, 25 Mar 2003 20:41:11 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18xuJM-0000Ba-00 for ; Tue, 25 Mar 2003 20:42:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xuHB-0005dL-02 for emacs-devel@quimby.gnus.org; Tue, 25 Mar 2003 14:40:01 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18xuG6-00058a-00 for emacs-devel@gnu.org; Tue, 25 Mar 2003 14:38:54 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18xuG4-00057R-00 for emacs-devel@gnu.org; Tue, 25 Mar 2003 14:38:53 -0500 Original-Received: from fep01.swip.net ([130.244.199.129] helo=fep01-svc.swip.net) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xuF1-0004KO-00; Tue, 25 Mar 2003 14:37:47 -0500 Original-Received: from gaffa.gaia.swipnet.se ([213.101.3.183]) by fep01-svc.swip.net with ESMTP <20030325193746.ZGJI3924.fep01-svc.swip.net@gaffa.gaia.swipnet.se>; Tue, 25 Mar 2003 20:37:46 +0100 In-Reply-To: "from Marshall, Simon at Mar 25, 2003 02:44:54 pm" Original-To: "Marshall, Simon" Original-cc: "'rms@gnu.org'" X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:12607 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12607 > This particular change was part of a group of changes made to prevent or > reduce multiple unnecessary runs of menu-bar-update-hook on things like > scrolls, tooltips, mouse-1 with mouse-sel-mode, C-s, C-x 2 or menu-bar > clicks. (The performance impact is so bad that I use 21.1.90 + these > changes for all my editing, rather than 21.2 or 21.3 which do not have > them.) The second part of this particular change made the code match > the comment; at the time Gerd said this code dated from at least 1994. > > It would be a shame if this change was simply reverted as the particular > problem (multiple unnecessary runs of menu-bar-update-hook on scroll) > will presumably resurface. Does the fact that you don't always see a > redisplay problem suggest that the bug lies elsewhere? It the if-statement in update_tool_bar that is entered if w->update_mode_line is Qt: /* If the user has switched buffers or windows, we need to recompute to reflect the new bindings. But we'll recompute when update_mode_lines is set too; that means that people can use force-mode-line-update to request that the menu bar be recomputed. The adverse effect on the rest of the redisplay algorithm is about the same as windows_or_buffers_changed anyway. */ if (windows_or_buffers_changed || !NILP (w->update_mode_line) || ((BUF_SAVE_MODIFF (XBUFFER (w->buffer)) < BUF_MODIFF (XBUFFER (w->buffer))) != !NILP (w->last_had_star)) || ((!NILP (Vtransient_mark_mode) && !NILP (XBUFFER (w->buffer)->mark_active)) != !NILP (w->region_showing))) { The other parts are false, but I really don't know what they all mean. windows_or_buffers_changed is 0 when I switch Info nodes. In effect, the buffer or the window has not changed, but its contents, active and inactive menu and tool bar items have. Jan D.