emacs-devel
[Top][All Lists]
Advanced

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

Re: Key bindings proposal


From: Eric M. Ludlam
Subject: Re: Key bindings proposal
Date: Tue, 27 Jul 2010 07:30:09 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.3a1pre) Gecko/20091222 Shredder/3.1a1pre

On 07/27/2010 06:32 AM, Stefan Monnier wrote:
If Emacs did take key binding customization seriously, it would have
>  provided a whole bunch of*declarative*  methods for specifying key
>  bindings, along with rules for how they override each other or not
>  override, as the need may be.
I understand what you want.  But, I'm not 100% sure what a good solution
would look like, and I'm even less clear on how we could get to such
a solution starting from Emacs's current system.

The main problem is not whether the method is declarative or not, but
rather the problem is to make intentions clear.

The issue with "intentions" is typically along the lines of "do you want
to bind `foo' to C-x C-x or do you want to bind it to the C-x key within
the main prefix keymap, or do you want to bind it to the repetition of
the key-sequence to which this main keymap is bound, or maybe only to
the repetition of just the last key in this key-sequence, or maybe to
the repetition of C-"the key above my "alt" key, or maybe you want to
bind it to whichever key `foobar' is bound in such-and-such-mode, ..."

Hi,

While it may not cover the gamut of possible keybinding remapping, one way to express intention is to make all the commands that get bound into global maps be overridable in some way. Some commands like beginning/end of line have this feature already. Modes of all sorts would then override the behavior they want to change instead of binding their custom functions to keys.

This would then make it much easier to just move all the Emacs core commands around while allowing the modes to follow easily.

Using something like mode-local.el is one way to do this in a declarative way which I used extensively in CEDET.

Eric




reply via email to

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