From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Tak Ota Newsgroups: gmane.emacs.devel Subject: Re: Using multiple minor-mode keymaps. Date: Sun, 10 Mar 2002 20:18:56 -0800 (PST) Organization: Sony Electronics Inc. Sender: emacs-devel-admin@gnu.org Message-ID: <20020310.201856.01365645.Takaaki.Ota@am.sony.com> References: <5xg039mks5.fsf@kfs2.cua.dk> <20020309.200417.107712392.Takaaki.Ota@am.sony.com> <5xwuwkw5sa.fsf@kfs2.cua.dk> 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 1015820542 19384 80.91.224.249 (11 Mar 2002 04:22:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 11 Mar 2002 04:22:22 +0000 (UTC) Cc: no-spam@cua.dk Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16kHKI-00052X-00 for ; Mon, 11 Mar 2002 05:22:22 +0100 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 16kHLq-0005qR-00 for ; Mon, 11 Mar 2002 05:23:59 +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 16kHJ4-0006Ni-00; Sun, 10 Mar 2002 23:21:06 -0500 Original-Received: from mail6.fw-sj.sony.com ([160.33.82.73]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16kHH9-0006K9-00 for ; Sun, 10 Mar 2002 23:19:08 -0500 Original-Received: from mail2.sjc.in.sel.sony.com (mail2.sjc.in.sel.sony.com [43.134.1.111]) by mail6.fw-sj.sony.com (8.8.8/8.8.8) with ESMTP id EAA22925; Mon, 11 Mar 2002 04:18:59 GMT Original-Received: by mail2.sjc.in.sel.sony.com id EAA20184; Mon, 11 Mar 2002 04:18:58 GMT Original-To: emacs-devel@gnu.org In-Reply-To: <5xwuwkw5sa.fsf@kfs2.cua.dk> X-Telephone: +1-858-942-3239 X-Fax------: +1-858-942-9142 X-SnailMail: 16450 West Bernardo Drive MZ7205, San Diego, CA 92127-1804 X-Mailer: Mew version 3.0.54 on Emacs 21.2.50.1 / Mule 5.0 (SAKAKI) 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:1842 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:1842 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 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