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

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

Re: Binding C-i without losing <tab> functionality


From: Andreas Politz
Subject: Re: Binding C-i without losing <tab> functionality
Date: Fri, 24 Oct 2008 19:37:37 +0200
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

jeep wrote:
On Oct 24, 2:30 am, Andreas Politz <poli...@fh-trier.de> wrote:
(member '(tab . [9]) function-keymap)

Would you mind explaining this a little? I cannot evaluate that in
emacs. And I don't understand what it's supposed to do.

Thanks,
-JEEP

I forgot a hyphen. The thing is called `function-key-map'.

(member '(tab . [9]) function-key-map)

After reading the mentioned info page (what you should have done as well)
, I would do it like so:

1. Don't translate tab into C-i.
(define-key function-key-map [tab] nil)

2. Swap the meanings of tab and C-i.
(define-key key-translation-map [9] [tab])
(define-key key-translation-map [tab] [9])

3. Bind tab (which is now actually C-i)
(global-set-key [tab] 'isearch-forward)

Note that I am an emacs newbie as well, so I can't tell what
sideeffects this has. But it seems to work. Unless the system
can't differentiate this 2 keys, like in an xterm.

-ap


reply via email to

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