[Top][All Lists]

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

Re: How to avoid SPACE TAB in a file?

From: Ulrich Neumerkel
Subject: Re: How to avoid SPACE TAB in a file?
Date: Wed, 25 Nov 2009 23:11:48 GMT

"Colin S. Miller" <address@hidden> writes:
>Ulrich Neumerkel wrote:
>> It occurs to me occasionally that I happen to write SPACE TAB in a buffer
>> saved into a file.  This is mostly when I edit files with different
>> tabbing conventions.
>> Is there are general clean minor-mode or other way to avoid writing
>> this combination in general?
>Hi Ulrich,
>If you want emacs to always insert spaces instead of tabs then you can put
>(setq indent-tabs-mode nil)
>in your .emacs.
>This needs to be set for each buffer, so it should be put in a hook like
>(add-hook 'c-mode-hook '(lambda ()
>    (setq indent-tabs-mode nil)))
>You'll need to replace 'c-mode-hook  with the correct hook for the
>editing mode you use. Most of them are named after the mode's main

The files/tabbing conventions are not mine, I just edit (tiny) parts of
the files.  That's how those extra spaces actually appear.
I am considering rolling it on my own with after-save-hook.

reply via email to

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