all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tak Ota <Takaaki.Ota@am.sony.com>
Cc: no-spam@cua.dk
Subject: Re: Using multiple minor-mode keymaps.
Date: Sun, 10 Mar 2002 20:18:56 -0800 (PST)	[thread overview]
Message-ID: <20020310.201856.01365645.Takaaki.Ota@am.sony.com> (raw)
In-Reply-To: <5xwuwkw5sa.fsf@kfs2.cua.dk>

Kim reminds me that `keymap' text property takes precedence over other
keymaps.  In table.el I have been using `local-map' text property
which I believe has been in Emacs before `keymap' text property came
around.

The edition 2.7 of the GNU Emacs Lisp Reference Manual states:

`local-map'
     You can specify a different keymap for some of the text in a
     buffer by means of the `local-map' property.  The property's value
     for the character after point, if non-`nil', is used for key
     lookup instead of the buffer's local map.  If the property value
     is a symbol, the symbol's function definition is used as the
     keymap.  *Note Active Keymaps::.

`keymap'
     The `keymap' property is similar to `local-map' but overrides the
     buffer's local map (and the map specified by the `local-map'
     property) rather than replacing it.

I now understand the difference in terms of precedence.  It sounds
like `keymap' is for overriding the `local-map' temporarily without
changing it.  But I want to know more about the purpose or recommended
use of the `keymap' text property.  Could someone enlighten me in this
area?  Thank you.

-Tak


10 Mar 2002 21:01:57 +0100: no-spam@cua.dk (Kim F. Storm) wrote:

> Tak Ota <Takaaki.Ota@am.sony.com> writes:
> 
> > 09 Mar 2002 23:35:54 +0100: no-spam@cua.dk (Kim F. Storm) wrote:
> > 
> > > Are you aware of the difference between the 'keymap and 'local-map
> > > text properties?  In 21.3, the keymap property takes precedence over
> > > all other keymaps, while local-map has lower priority that the
> > > minor-mode-keymaps (it has the same precedence as local-key-map (which
> > > is replaces)).
> > 
> > I didn't know that.  I should then use 'keymap text property instead
> > of 'local-map.  In deed, the latest elisp manual does explain the
> > relationship between the two.  Is 'keymap text property a new entry
> > from 21.3?  Thanks for the reminder.
> 
> No, it also existed before, but it had the same precedence as local-map.
> I suggested to change it to the "new order", and RMS agreed.
> 
> ++kfs

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


       reply	other threads:[~2002-03-11  4:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5xg039mks5.fsf@kfs2.cua.dk>
     [not found] ` <20020309.200417.107712392.Takaaki.Ota@am.sony.com>
     [not found]   ` <5xwuwkw5sa.fsf@kfs2.cua.dk>
2002-03-11  4:18     ` Tak Ota [this message]
2002-03-11 19:05       ` Using multiple minor-mode keymaps Richard Stallman

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

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

  git send-email \
    --in-reply-to=20020310.201856.01365645.Takaaki.Ota@am.sony.com \
    --to=takaaki.ota@am.sony.com \
    --cc=no-spam@cua.dk \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.