emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using multiple minor-mode keymaps.


From: Tak Ota
Subject: Re: Using multiple minor-mode keymaps.
Date: Sun, 10 Mar 2002 20:18:56 -0800 (PST)

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: address@hidden (Kim F. Storm) wrote:

> Tak Ota <address@hidden> writes:
> 
> > 09 Mar 2002 23:35:54 +0100: address@hidden (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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]