[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Proposal: Bind backspace and delete like DEL in view-mode
From: |
Kim F. Storm |
Subject: |
Re: Proposal: Bind backspace and delete like DEL in view-mode |
Date: |
23 Dec 2001 00:07:22 +0100 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 |
address@hidden (Kai GroÃjohann) writes:
> address@hidden (Kim F. Storm) writes:
>
> > I don't know, but maybe it would make more sense to put those
> > mappings into something similar to the keyboard-translate-table
> > which is done FIRST rather than "MAYBE LATER".
>
> I'm not sure what to do here. What about people who want C-i and
> <tab> to be different? If you unconditionally convert <tab> into TAB
> (which is the same as C-i), then you lose that feature.
>
> Right now, people can bind (kbd "TAB") or (kbd "<tab>"), as they like.
>
But if someone binds <tab> in global-map, any minor mode keymap which only
has a binding for TAB will no longer work - as the binding in global-map
will take precedence over the mapping of <tab> to TAB in function-key-map.
>
> But let's talk specifically about DEL. It really seems that it's not
> so easy to rebind DEL: newbies are wont to do something wrong there,
> as many newbies come from the PC world where they think of the keys
> <backspace> and <delete>, and DEL being (more or less) the same as
> <backspace> is surely a surprise to them.
>
> For this case, it might be useful to set things up the other way
> round: do
>
> (define-key function-key-map (kbd "<backspace>") nil)
> (define-key function-key-map (kbd "DEL") (kbd "<backspace>"))
>
> and then bind (kbd "<backspace>") rather than (kbd "DEL") in all mode
> maps. What do people think about this?
>
It seems like a really good idea.
The only drawback I can think of is that any explicit binding of DEL
in global-map will then break the mapping of <backspace> the same way
that an explicit binding of <backspace> breaks DEL mappings now.
Consequently, existing (correct) bindings of DEL in global-map will
no longer DTRT :-(
I'm still not sure what is the best solution, but having define-key
look up keys in function-key-map and see if they map to DEL - and then
bind to DEL instead - does seem to DTRT in all practical cases.
And it could do the same for TAB, RET and LFD.
For the expert user, there could be a new optional argument to
define-key to inhibit this behaviour.
- Re: Proposal: Bind backspace and delete like DEL in view-mode, (continued)
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kai GroÃjohann, 2001/12/21
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kim F. Storm, 2001/12/21
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Richard Stallman, 2001/12/23
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kai GroÃjohann, 2001/12/21
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kim F. Storm, 2001/12/21
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kai GroÃjohann, 2001/12/22
- Re: Proposal: Bind backspace and delete like DEL in view-mode,
Kim F. Storm <=
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kai Großjohann, 2001/12/23
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Richard Stallman, 2001/12/23
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kai Großjohann, 2001/12/25
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kim F. Storm, 2001/12/25
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Richard Stallman, 2001/12/26
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kai Großjohann, 2001/12/26
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kim F. Storm, 2001/12/26
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Eli Zaretskii, 2001/12/27
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Kim F. Storm, 2001/12/27
- Re: Proposal: Bind backspace and delete like DEL in view-mode, Richard Stallman, 2001/12/28