[Python-Dev] Re: [Python-checkins] SourceForge problems

Fredrik Lundh effbot@telia.com
Sat, 28 Oct 2000 12:43:05 +0200

fred wrote:
>   At any rate, there has been activity in the source tree; you just
> might want to do a CVS update to see what's changed.  There have been
> a number of bug fixes, a fair number of documentation updates, and
> many of the modules in the standard library have been passed through
> Tim Peter's reindent.py script (look in Tools/scripts/).

now that this has been done, emacs users might want to
add something like the following to their local configuration
(based on code by jwz, so it should work...)


(defun python-mode-untabify ()
    (goto-char (point-min))
    (while (re-search-forward "[ \t]+$" nil t)
      (delete-region (match-beginning 0) (match-end 0)))
    (goto-char (point-min))
    (if (search-forward "\t" nil t)
        (untabify (1- (point)) (point-max))))
 (add-hook 'python-mode-hook 
          '(lambda ()
             (make-local-variable 'write-contents-hooks)
             (add-hook 'write-contents-hooks 'python-mode-untabify)))