unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: no-spam@cua.dk (Kim F. Storm)
Cc: Takaaki.Ota@am.sony.com
Subject: Re: table.el 1.6.1
Date: 22 Mar 2002 16:01:23 +0100	[thread overview]
Message-ID: <5xbsdg3av0.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200203221226.g2MCQZa01737@aztec.santafe.edu>

Richard Stallman <rms@gnu.org> 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 <storm@cua.dk> http://www.cua.dk


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-03-22 15:01 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-20  5:22 table.el 1.6.1 Tak Ota
2002-03-21  1:38 ` Stefan Monnier
2002-03-21  5:37   ` Tak Ota
2002-03-21  8:41     ` Kim F. Storm
2002-03-21 21:43       ` Kim F. Storm
2002-03-21 22:20         ` Tak Ota
2002-03-21  8:45     ` Kim F. Storm
2002-03-21  9:13       ` Tak Ota
2002-03-22 12:26     ` Richard Stallman
2002-03-22 15:01       ` Kim F. Storm [this message]
2002-03-22 15:12         ` Kim F. Storm
2002-03-22 15:48           ` Tak Ota
2002-03-22 16:13             ` Kim F. Storm
2002-03-22 17:00             ` Stefan Monnier
2002-03-22 18:15               ` Tak Ota
2002-03-23 16:14         ` Richard Stallman
2002-03-23 17:11           ` Kim F. Storm
2002-03-25  0:19             ` Richard Stallman
2002-03-25 21:59             ` Stefan Monnier
2002-03-25 22:26               ` Kim F. Storm
2002-03-28 20:48                 ` Richard Stallman
2002-03-28 23:21                   ` Kim F. Storm
2002-03-30  3:43                     ` Richard Stallman
2002-03-31 20:40                       ` Kim F. Storm
2002-03-31 21:56                         ` Miles Bader
2002-03-22  6:01 ` table.el 1.6.3 Tak Ota
  -- strict thread matches above, loose matches on Subject: below --
2002-03-20 21:30 table.el 1.6.1 Tak Ota

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5xbsdg3av0.fsf@kfs2.cua.dk \
    --to=no-spam@cua.dk \
    --cc=Takaaki.Ota@am.sony.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).