From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: no-spam@cua.dk (Kim F. Storm) Newsgroups: gmane.emacs.devel Subject: Re: table.el 1.6.1 Date: 22 Mar 2002 16:01:23 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <5xbsdg3av0.fsf@kfs2.cua.dk> References: <20020319.212249.60850794.Takaaki.Ota@am.sony.com> <200203210138.g2L1cum14295@rum.cs.yale.edu> <20020320.213722.110254553.Takaaki.Ota@am.sony.com> <200203221226.g2MCQZa01737@aztec.santafe.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1016809403 17311 127.0.0.1 (22 Mar 2002 15:03:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 22 Mar 2002 15:03:23 +0000 (UTC) Cc: Takaaki.Ota@am.sony.com Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16oQZe-0004V6-00 for ; Fri, 22 Mar 2002 16:03:22 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16oQgM-0007Uf-00 for ; Fri, 22 Mar 2002 16:10:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16oQZU-0000iL-00; Fri, 22 Mar 2002 10:03:12 -0500 Original-Received: from mail.filanet.dk ([195.215.206.179]) by fencepost.gnu.org with smtp (Exim 3.34 #1 (Debian)) id 16oQWv-0000dL-00 for ; Fri, 22 Mar 2002 10:00:33 -0500 Original-Received: from kfs2.cua.dk.cua.dk (kfs2.local.filanet.dk [192.168.1.182]) by mail.filanet.dk (Postfix) with SMTP id 9D2197C04B; Fri, 22 Mar 2002 15:00:27 +0000 (GMT) Original-To: emacs-devel@gnu.org In-Reply-To: <200203221226.g2MCQZa01737@aztec.santafe.edu> Original-Lines: 68 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.5 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:2130 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:2130 Richard Stallman writes: > Yes, the position-dependent menubar entry does work under 21.1.90, > however does not work under 21.2.50 and 20.7. > > We decided to stop supporting position-dependent menubar entries > because they did not work reliably. Emacs does not recompute the > menubar when point moves, not in general. We figured that turning this > off completely was easier than making the feature work well enough > to be used. > > However, if it really needs to work, we could make it efficient. > Emacs could recompute the menu bar whenever the keymap or local-map > property at point now is different from the corresponding property > at point last time. I think it would be simpler to do an update whenever point moves in or out of an interval -- it may be a little wasteful, but we already have all the necessary information to do that in set_point_both, i.e. the following change would seem to be sufficient (not tested). It still doesn't work for menu-bar or tool-bar binding in overlay keymaps, but it's better than before... Index: intervals.c =================================================================== RCS file: /cvs/emacs/src/intervals.c,v retrieving revision 1.113 diff -c -r1.113 intervals.c *** intervals.c 14 Mar 2002 08:11:46 -0000 1.113 --- intervals.c 22 Mar 2002 14:58:52 -0000 *************** *** 2002,2013 **** fromprev = from; /* Moving within an interval. */ ! if (to == from && toprev == fromprev && INTERVAL_VISIBLE_P (to) ! && ! have_overlays) { ! temp_set_point_both (buffer, charpos, bytepos); ! return; } original_position = charpos; --- 2002,2019 ---- fromprev = from; /* Moving within an interval. */ ! if (to == from && toprev == fromprev && INTERVAL_VISIBLE_P (to)) { ! if (! have_overlays) ! { ! temp_set_point_both (buffer, charpos, bytepos); ! return; ! } } + else + /* Refresh in case we entered or left an interval with with + menu-bar or tool-bar bindings in the keymap or local-map property. */ + update_mode_lines++; original_position = charpos; -- Kim F. Storm http://www.cua.dk _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel