[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: Colin S. Miller
Subject: Re: How to avoid SPACE TAB in a file?
Date: Wed, 25 Nov 2009 20:04:11 +0000
User-agent: Mozilla-Thunderbird (X11/20090706)

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

Colin S. Miller
Replace the obvious in my email address with the first three letters of the 
hostname to reply.

reply via email to

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