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: Fri, 09 Dec 2005 00:59:46 +0100 Message-ID: <4398C8F2.8060301@student.lu.se> References: <3cc04a73cc1b1a.3cc1b1a3cc04a7@net.lu.se> <43987D21.4070200@student.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 1134086471 17063 80.91.229.2 (9 Dec 2005 00:01:11 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 9 Dec 2005 00:01:11 +0000 (UTC) Cc: "Kim F. Storm" , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 09 01:01:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EkVgM-0004G2-Na for ged-emacs-devel@m.gmane.org; Fri, 09 Dec 2005 01:00:15 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkVgg-0001I6-1B for ged-emacs-devel@m.gmane.org; Thu, 08 Dec 2005 19:00:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EkVgJ-0001I1-It for emacs-devel@gnu.org; Thu, 08 Dec 2005 19:00:11 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EkVgH-0001Ha-Cl for emacs-devel@gnu.org; Thu, 08 Dec 2005 19:00:10 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EkVgG-0001HQ-V0 for emacs-devel@gnu.org; Thu, 08 Dec 2005 19:00:09 -0500 Original-Received: from [81.228.8.164] (helo=pne-smtpout2-sn2.hy.skanova.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EkVhM-0005Q4-Tq for emacs-devel@gnu.org; Thu, 08 Dec 2005 19:01:17 -0500 Original-Received: from [192.168.123.121] (83.249.218.244) by pne-smtpout2-sn2.hy.skanova.net (7.2.060.1) id 43960D0D000B625B; Fri, 9 Dec 2005 00:59:47 +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:47266 Archived-At: Stefan Monnier wrote: >>Go through the list below step by step. As soon as a it (see KeyLookup) is >>found in any keymap you are ready. >> >> > >That would probably be a good idea. E.g. you forgot to include >key-translation-map, function-key-map, keyboard-translate-table, >translation-table-for-input, maybe more? > > > Stefan > > This was rather hairy. Is the table below 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 hit is found in any keymap (see KeyLookup) you are ready. *) First apply `extra-keyboard-modifiers' mask to each keyboard character read. *) Each character read from the keyboard may be translated according to `keyboard-translate-table'. *) Characters that are self-inserting are translated according to `translation-table-for-input'. If a character is self-inserting then you are ready. FIRST-MAP) 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". *) If it is an ASCII function key sequences then look in function-key-map. This map transforms to Emacs key sequences. *) The possibly transformed sequence after applying `function-key-map' is now handled to `key-translation-map' which works the same way. *) If any transformation was made by `function-key-map' or `key-translation-map' then take the new sequence and go back to FIRST-MAP.