[Top][All Lists]

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

Re: TAB key to insert tab character

From: Eli Zaretskii
Subject: Re: TAB key to insert tab character
Date: Sun, 10 Feb 2008 06:14:27 +0200

> From: Blake McBride <address@hidden>
> Date: Sat, 09 Feb 2008 14:56:02 -0600
> > You could do what I do - bind Ctrl-Tab to insert an ASCII <tab>:
> > 
> >   (global-set-key [C-tab] (lambda () (interactive) (insert-char 9 1)))
> > 
> > - Will
> I don't want to globally set anything.  I like the way the TAB key works 
> in C and Lisp modes.  I just want to change its behavior in TEXT and 

Did you actually try that?  I think mode-specific key bindings always
override global bindings, so the above will not affect C mode. for

But if you want to bind TAB in Text mode, then try the below:

  (define-key text-mode-map "\C-i" 'self-insert-command)

You will need to do this in a text-mode-hook.

reply via email to

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