[Python-Dev] Making -tt the default

Greg Stein gstein@lyra.org
Mon, 3 Jul 2000 23:39:38 -0700

On Tue, Jul 04, 2000 at 02:06:43AM -0400, Tim Peters wrote:
> > Ok, I'll keep an eye out and see if I can reproduce what I'm doing wrong.
> > Sorry for just complaining and not giving people a chance to fix
> > whatever it is I'm doing wrong =).
> It occurs to me that I had Emacs set up (in my own .emacs) to never ever use
> literal tab characters.  That may go a way in explaining why pymode never
> generated ambiguous indentation for me!
> I suppose you can also get in trouble by editing *other* peoples' code
> containing a mix of tabs and spaces.  So never do that either.

I use the following tidbit of code in my .emacs:

(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)

The indent-tabs-mode is the key to disabling tab characters and using just


Greg Stein, http://www.lyra.org/