From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Function for deleting a key binding in a sparse keymap Date: Sat, 10 Dec 2005 20:12:50 -0500 Message-ID: <87d5k478le.fsf-monnier+emacs@gnu.org> References: <3cc04a73cc1b1a.3cc1b1a3cc04a7@net.lu.se> <43987D21.4070200@student.lu.se> <4398C8F2.8060301@student.lu.se> <4399E538.2080909@student.lu.se> <439B688C.1090207@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134263700 21208 80.91.229.2 (11 Dec 2005 01:15:00 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 11 Dec 2005 01:15:00 +0000 (UTC) Cc: storm@cua.dk, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 11 02:14:58 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ElFmA-0006tj-MP for ged-emacs-devel@m.gmane.org; Sun, 11 Dec 2005 02:13:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElFma-0005DF-4N for ged-emacs-devel@m.gmane.org; Sat, 10 Dec 2005 20:13:44 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ElFmD-0005BA-JR for emacs-devel@gnu.org; Sat, 10 Dec 2005 20:13:21 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ElFmC-00058z-14 for emacs-devel@gnu.org; Sat, 10 Dec 2005 20:13:21 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ElFmB-00058m-Pl for emacs-devel@gnu.org; Sat, 10 Dec 2005 20:13:19 -0500 Original-Received: from [209.226.175.110] (helo=tomts43-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1ElFnd-0002pD-AS; Sat, 10 Dec 2005 20:14:49 -0500 Original-Received: from alfajor ([70.49.81.194]) by tomts43-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20051211011250.DUDN23065.tomts43-srv.bellnexxia.net@alfajor>; Sat, 10 Dec 2005 20:12:50 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 903CCD7377; Sat, 10 Dec 2005 20:12:50 -0500 (EST) Original-To: Lennart Borgman In-Reply-To: <439B688C.1090207@student.lu.se> (Lennart Borgman's message of "Sun, 11 Dec 2005 00:45:16 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [0] 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:47416 Archived-At: > @item > Characters that are self-inserting are translated according to > @code{translation-table-for-input}. If a character is self-inserting > then stop here. As Kim noticed, this is wrong: this translation is applied at the very end by the "self-insertion" function (and only if the function was correctly fixed to take this table into account). I suggested to move it basically to where you placed it (which implies it's used regardless of whether it'll be self-inserting or not), but Richard rejected it. > @itemize @bullet > @item > If using @code{read-from-minibuffer} (directly or indirectly) then > look in the keymap given as parameter then look in this. Otherwise > look in @code{minibuffer-local-map}. Actually, minibuffer-local-map is nothing more than the keymap used as "local keymap" in the minibuffers. So it shouldn't be in this list. > @item > If using @code{read-no-blanks-input} to read from minibuffer then look > in @code{minibuffer-local-ns-map} first and then > @code{minibuffer-local-map}. Same here. All the minibuffer-local-*-map are just various keymaps that are used as "local keymap" in various circumstances. So they're basically like major mode maps for special major modes which are only used in the minibuffer. > @item > Is there a @code{local-map} property of the text or overlay at point? > @item > Is there a "local keymap" (those are for major modes)? > @end itemize Actually the above two are mutually exclusive: if a `local-map' property is found, it's used instead of the local keymap. > @itemize @bullet > @item > If it is an ASCII function key sequences then look in > @code{function-key-map}. This map transforms to Emacs key sequences. This also applies to non-ASCII sequences. But it only applies if no binding was found yet. > @item > The possibly transformed sequence after applying > @code{function-key-map} is now handled to @code{key-translation-map} > which works the same way. Actually key-translation-map is different because it applies even if the untranslated sequence already had a binding. Also those mappings are not repeated. Stefan