[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Key bindings proposal
From: |
Stephen J. Turnbull |
Subject: |
Re: Key bindings proposal |
Date: |
Tue, 27 Jul 2010 20:32:01 +0900 |
Stefan Monnier writes:
> 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,
> ..."
In most cases the intention is "bind it to a short sequence I
personally don't use otherwise, and otherwise arbitrary," I would
expect.
> Using `remap' is one way to express such an intention.
Not really. Remap is about deprecating a command, not really about
key sequence choice. People who are worried about mapping issues
define whole keymaps (viz Miles's caps-lock-mode, with *one* binding
in it). People who aren't, don't. The question here is whether
you're willing to make life painful for people who don't pay attention
to keymaps *as maps* to force them to pay attention to keymaps:
> I would welcome patches that try to make intentions more clear
> (e.g. eliminate the massive hardcoding of the "C-c" prefix all over
> the place)
Heh. Just make define-key error on any keysequence with a prefix
bound to a keymap, unless there's a nonnil FORCE argument.
Alternatively, you could have define-key normally recurse into keymaps
the way lookup-key and *-key-binding do, unless there's a non-nil
FORCE argument.
- Key bindings proposal [Was: Emacs learning curve], Uday S Reddy, 2010/07/26
- Key bindings proposal [Was: Emacs learning curve], Stephen J. Turnbull, 2010/07/26
- Re: Key bindings proposal, Stefan Monnier, 2010/07/27
- Re: Key bindings proposal, Eric M. Ludlam, 2010/07/27
- Re: Key bindings proposal,
Stephen J. Turnbull <=
- Re: Key bindings proposal, Stefan Monnier, 2010/07/27
- Re: Key bindings proposal, Stephen J. Turnbull, 2010/07/27
- Re: Key bindings proposal, Uday S Reddy, 2010/07/27
- Re: Key bindings proposal, Stephen J. Turnbull, 2010/07/28
- Re: Key bindings proposal, Uday S Reddy, 2010/07/28
- Re: Key bindings proposal, Stephen J. Turnbull, 2010/07/29
- Re: Key bindings proposal, Uday S Reddy, 2010/07/27
- Re: Key bindings proposal, Miles Bader, 2010/07/27
- Re: Key bindings proposal, Stefan Monnier, 2010/07/29
Re: Key bindings proposal, Uday S Reddy, 2010/07/29