From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Function for deleting a key binding in a sparse keymap Date: Thu, 08 Dec 2005 19:36:17 +0100 Message-ID: <43987D21.4070200@student.lu.se> References: <3cc04a73cc1b1a.3cc1b1a3cc04a7@net.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1134069236 26620 80.91.229.2 (8 Dec 2005 19:13:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 8 Dec 2005 19:13:56 +0000 (UTC) Cc: emacs-devel@gnu.org, "Kim F. Storm" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 08 20:13:53 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EkRCG-00075h-5X for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2005 20:12:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkRCY-0005eT-OX for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2005 14:13:10 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkQdQ-0002b6-Dx for emacs-devel@gnu.org; Thu, 08 Dec 2005 13:36:52 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkQdO-0002ZE-GA for emacs-devel@gnu.org; Thu, 08 Dec 2005 13:36:51 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkQdO-0002Z8-Bn for emacs-devel@gnu.org; Thu, 08 Dec 2005 13:36:50 -0500 Original-Received: from [81.228.11.159] (helo=pne-smtpout2-sn1.fre.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkQeS-0000d1-64 for emacs-devel@gnu.org; Thu, 08 Dec 2005 13:37:56 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn1.fre.skanova.net (7.2.069.1) id 4394B97C000F3B33; Thu, 8 Dec 2005 19:36:18 +0100 User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en Original-To: Stefan Monnier In-Reply-To: X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:47239 Archived-At: Stefan Monnier wrote: >>Because in this case it is a temporary minor mode that exists just during >>a few keystrokes. I actually put the keymap first in >>emulation-mode-map-alists to avoid any problem. Nearly all keys except >>those for using the mode are bound to a function that exits the >>temporary mode. >> >> > >Any reason not to use overriding-(terminal-)local-map like isearch does? > > > Stefan > Me. I did not know about it. Seems like what I want to use. I found it a bit difficult to remember this. Would not a table like the one below be helpful? Is it correct? ***************************************************************************** How to find the keymap for a given key sequence in a buffer =========================================================== Go through the list below step by step. As soon as a it (see KeyLookup) is found in any keymap you are ready. *) Look in `special-event-map'. *) If overriding-terminal-local-map look in this. Then go to GLOBAL. *) If overriding-local-map look in this. Then go to GLOBAL. *) Is there a "keymap" property of the text or overlay at point? *) Look for minor mode keymaps in `emulation-mode-map-alists'. *) Look for minor mode keymaps in `minor-mode-map-alist'. *) Is there a `local-map' property of the text or overlay at point? *) Is there a "local keymap" (those are for major modes)? GLOBAL) Look in the "global keymap".