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: Old redisplay bug in xdisp.c, question about change Date: Sun, 23 Mar 2003 23:01:37 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200303232254.h2NMsobL004941@stubby.bodenonline.com> 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 1048457020 7366 80.91.224.249 (23 Mar 2003 22:03:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 23 Mar 2003 22:03:40 +0000 (UTC) Cc: rms@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Mar 23 23:03:37 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 18xDZ3-0001uW-00 for ; Sun, 23 Mar 2003 23:03:37 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18xDZE-0008LZ-00 for ; Sun, 23 Mar 2003 23:03:48 +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 18xDYN-0004lF-06 for emacs-devel@quimby.gnus.org; Sun, 23 Mar 2003 17:02:55 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18xDY7-0004iv-00 for emacs-devel@gnu.org; Sun, 23 Mar 2003 17:02:39 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18xDY5-0004hM-00 for emacs-devel@gnu.org; Sun, 23 Mar 2003 17:02:38 -0500 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18xDY4-0004ek-00; Sun, 23 Mar 2003 17:02:36 -0500 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h2NMsobL004941; Sun, 23 Mar 2003 23:54:51 +0100 Original-To: emacs-devel@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:12553 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:12553 Hello. I was looking for a redisplay bug I thought was in the GTK parts. It turns out that the bug is present in both the Motif and Lucid ports also. To reproduce. emacs -q --no-site-file C-h i Select a node with the mouse. Sometimes the bug can be seen right here. The tool bar arrows for up and next are still disabled. If they are disabled, do a Ctrl-l to fix. Now press 'u' to go up. The next and up tool bar arrows are now enabled, they shall be disabled. Again, Ctrl-l fixes it. There seems to be a bit of race condition here, the bug does not always show up. I traced the origin to this change: 2002-03-26 Richard M. Stallman * xdisp.c (update_menu_bar): Test only update_mode_lines; The diff: @@ -7435,8 +7438,14 @@ window = FRAME_SELECTED_WINDOW (f); w = XWINDOW (window); +#if 0 /* The if statement below this if statement used to include the + condition !NILP (w->update_mode_line), rather than using + update_mode_lines directly, and this if statement may have + been added to make that condition work. Now the if + statement below matches its comment, this isn't needed. */ if (update_mode_lines) w->update_mode_line = Qt; +#endif if (FRAME_WINDOW_P (f) ? @@ -7455,7 +7464,9 @@ 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) + /* This used to test w->update_mode_line, but we believe + there is no need to recompute the menu in that case. */ + || update_mode_lines || ((BUF_SAVE_MODIFF (XBUFFER (w->buffer)) < BUF_MODIFF (XBUFFER (w->buffer))) != !NILP (w->last_had_star)) The comments indicate that the menu does not need to be updated, but apparently the tool bar is not updated either, because w->update_mode_line is not set to Qt. There seems to be no ill effects from reverting this change, but since I don't know why it was made in the first place, I can not be sure. Does anybody remember the reason for this change? Thanks, Jan D.