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

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

Re: [emacs] tabs, spaces, and indentation


From: Stefan Monnier
Subject: Re: [emacs] tabs, spaces, and indentation
Date: Wed, 08 Dec 2010 15:31:07 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

> ;;force TAB to insert just one TAB:
>     (global-set-key (kbd "TAB") 'self-insert-command)
> (This would be for every mode - but it may be best to just set it for
> your C mode)

Note also that it may fail to work for some major modes, in which case
it's normally a bug in that major mode.

For the problem of having auto-indentation take place while inserting
some other character, this is usually considered a feature, named
"electric keys" or something like that.  Until now this has been
implemented in ad-hoc ways, separately in each major mode, so the way to
turn it off is different for each and every major mode.

Emacs-24 will introduce a standard way to provide this feature, with
a corresponding standard way (called electric-indent-mode) to turn it on
or off globally (tho it will only work with those major modes which use
this new standard implementation rather than doing it their own way).


        Stefan


reply via email to

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