0

I'm an amateur in Emacs and I would like to change TAB with C-q TAB. I used the code:

(define-key key-translation-map (kbd "TAB") (kbd"C-q TAB"))

But by doing so, I need to press TAB twice in order to get a indent and under the screen it shows C-q TAB TAB.

Why would this happen? How can I get the indent only by pressing TAB once?

NickD
  • 27,023
  • 3
  • 23
  • 42
  • 3
    What is it that you are *really* trying to do? If you want `TAB` to just insert a `TAB` character then bind `TAB` to `self-insert-command`. But be aware that various modes bind `TAB` in other ways, so you may need to either bind it to what you want in those modes or define a minor mode where you bind it to what you want, and then turn on that minor mode. – Drew Nov 18 '16 at 00:34
  • @Drew that's what I want. Can you tell me how to achieve it exactly? –  Nov 18 '16 at 01:59
  • Then the answer you want is [here](http://emacs.stackexchange.com/a/27943/105). And really this question should probably be closed as a duplicate of that one (or nearly duplicate - at least that answer is what you're looking for). – Drew Nov 18 '16 at 03:01

0 Answers0