From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: Re: dispatched randomly [key bindings reported incorrectly] Date: Thu, 20 Jul 2006 16:16:07 -0600 Organization: IHS Message-ID: References: <278xmpite8.fsf@mo.msk.ru> <43wta8cimg.fsf@mo.msk.ru> 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 1153433896 7538 80.91.229.2 (20 Jul 2006 22:18:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2006 22:18:16 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 21 00:18:16 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3gqR-0007T3-Fb for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Jul 2006 00:18:11 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3gqQ-0004wx-U1 for geb-bug-gnu-emacs@m.gmane.org; Thu, 20 Jul 2006 18:18:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3gq7-0004fI-42 for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2006 18:17:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3gq5-0004db-Qq for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2006 18:17:50 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3gq5-0004dT-Ae for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2006 18:17:49 -0400 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1G3gqM-00039k-Fe for bug-gnu-emacs@gnu.org; Thu, 20 Jul 2006 18:18:06 -0400 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G3gpv-0007Oy-JI for bug-gnu-emacs@gnu.org; Fri, 21 Jul 2006 00:17:39 +0200 Original-Received: from 207.167.42.206 ([207.167.42.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jul 2006 00:17:39 +0200 Original-Received: from ihs_4664 by 207.167.42.206 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Jul 2006 00:17:39 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-To: bug-gnu-emacs@gnu.org Original-Lines: 39 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 207.167.42.206 User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) In-Reply-To: <43wta8cimg.fsf@mo.msk.ru> X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15232 Archived-At: Ilya N. Golubev wrote: > That is, `viper-vi-basic-minor-mode' is before `view-mode' in > `minor-mode-map-alist'. Still `view-mode' bindings override those of > `viper-vi-basic-minor-mode', both as reported by `describe-bindings' > and as keys are actually dispatched. So bindings of ascii characters > are highly inconsistent and appear random. That is disturbing. But I just came across this in the Active Keymaps node of the Emacs Lisp manual: | Normally the active keymaps are the `keymap' property keymap, the | keymaps of any enabled minor modes, the current buffer's local keymap, | and the global keymap, in that order. Therefore, Emacs searches for | each input key sequence in all these keymaps. Here is a pseudo-Lisp | description of how this process works: | | (or (if overriding-terminal-local-map | (FIND-IN overriding-terminal-local-map) | (if overriding-local-map | (FIND-IN overriding-local-map) | (or (FIND-IN (get-text-property (point) 'keymap)) | (FIND-IN-ANY emulation-mode-map-alists) | (FIND-IN-ANY minor-mode-overriding-map-alist) | (FIND-IN-ANY minor-mode-map-alist) | (if (get-text-property (point) 'local-map)) | (FIND-IN (get-text-property (point) 'local-map)) | (FIND-IN (current-local-map)))))) | (FIND-IN (current-global-map))) | | Here, the pseudo-function FIND-IN means to look up the key sequence in | a single map, and FIND-IN-ANY means to search the appropriate keymaps | from an alist. (Searching a single keymap for a binding is called "key | lookup"; see *Note Key Lookup::.) Does `C-h v overriding-local-map', `C-h v emulation-mode-map-alists', or `C-h v minor-mode-overriding-map-alist' explain the behavior you see? -- Kevin