|
From: | Christoph Scholtes |
Subject: | Re: completion-list-mode-map |
Date: | Tue, 05 Jul 2011 19:37:30 -0600 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0 |
On 7/2/2011 11:38 PM, Stefan Monnier wrote:
or is there implicit inheritance of the keymap when deriving from special mode?Yes, that inheritance is implicit (it's set up when the mode is activated) unless the keymap already has a parent.
Thanks.I started looking into this and it looks like it is more complicated than I thought. I grepped for `'mode-class 'special' and got a pageful of hits. Some of these modes are already derived from special modes, some are not. Looking at the ones that are not, I am wondering if they should be.
For example:- arc-mode's mode-class is special. However, arc-mode is not derived from special-mode. Should it be?
- comint-mode is derived from fundamental-mode, but it's mode-class is also special. Should it be derived from special-mode instead?
In other cases modes derive from special-mode already, but the key map parent is not set to special-mode map. For example, tar-mode. Should the key map parent always be special-mode-map?
What prompted me to look into this in the first place was the inconsistent behavior of `q'/`z' when trying to quit/kill buffers. special-mode map defines `q' as quit-window and `z' as kill-this-buffer, but some keymaps define `q' as, for example, thumbs-kill-buffer. How do we handle these cases?
Thanks, Christoph
[Prev in Thread] | Current Thread | [Next in Thread] |