How to set Emacs tabs to spaces in every new file?

coding-style, convention, emacs, indentation

Solution

add this in your .emacs:

(setq-default indent-tabs-mode nil)

or you can define a before-save-hook that eliminate hard tabs

Problem

I would like to have an .emacs setting so that tabs are always formed by consecutive spaces. Preferably in each possible mode. In other editors it never seemed a problem, but in .emacs I'm a bit stuck with the tabs I'm afraid.

Original source