bbatsov/emacs-prelude — pull request #86 by pjkundert (2012-02-27 22:00:55+00:00)
Title: Handle tabs better, convert all prelude-*-hooks to follow run-hooks convention

Historically, tabs always offset to the next 8-character position. Altering tab-width destroys the ability of correctly load all existing files! Furthermore, it actually destroys the ability to safely load Python at all, since indentation changes would actually alter the semantics of the program. Restored tab-width to 8.

The correct way to adjust indentation level, is to change -basic-offset or -indent-offset. This causes the mode to use an alternative number of spaces for indentation; for example (setq c-basic-offset 4) would adjust any indentation for C, C++, Java, PHP, etc. Likewise, (setq python-indent-offset 2) would use 2-space indentation for Python code.

In addition, all prelude-*-mode-hooks have been converted from functions into lists, to be compatible with (run-hooks ...), and any supplied prelude mode defaults attached to these hooks. This allows any prelude mode's defaults to be adjusted easily in the prelude-personal-dir lisp files; an example file is supplied.