bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dispatched randomly [key bindings reported incorrectly]


From: Kevin Rodgers
Subject: Re: dispatched randomly [key bindings reported incorrectly]
Date: Thu, 20 Jul 2006 16:16:07 -0600
User-agent: Thunderbird 1.5.0.4 (Windows/20060516)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]