[Python-Dev] Making -tt the default
Wed, 5 Jul 2000 13:42:30 -0700
On Wed, Jul 05, 2000 at 07:56:02AM -0400, Barry A. Warsaw wrote:
> >>>>> "GS" == Greg Stein <firstname.lastname@example.org> writes:
> GS> (add-hook 'python-mode-hook
> | (lambda ()
> | (setq indent-tabs-mode nil)
> | (setq py-indent-offset 2)
> | (setq py-smart-indentation nil)
> | (define-key py-mode-map "\e\C-h" 'backward-kill-word)
> | ))
> GS> The indent-tabs-mode is the key to disabling tab characters
> GS> and using just spaces.
> Greg, can you explain why you turn off py-smart-indentation? Its
> purpose is to give you the correct settings when editing someone
> else's existing code. With this variable set to t, it tries to guess
> the existing code's indentation level depth and then sets
> py-indent-offset to that value, on the assumption that
> 1) the original author indented their code consistently
> 2) it is better to be consistent with the existing indentation than
> impose your own and have mixed indentation
> Both of these are worthy goals, IMO, so py-smart-indentation should
> generally remain true.
The goal is fine, and I agree with it. However, it was guessing the wrong
tab for me at some point, and so I just turned it off.
That's the way I have it; other people probably don't want to do that.
Greg Stein, http://www.lyra.org/