# HG changeset patch # User Augie Fackler # Date 1493405538 14400 # Node ID 5843408c9a38f7e96f52b79b004311b63ec34b59 # Parent 27e8ad5acedf44d33a25394b37b15ad7d644d3cb modes: try and clean up python indentation a bit diff --git a/.elisp/settings/40.modes.el b/.elisp/settings/40.modes.el --- a/.elisp/settings/40.modes.el +++ b/.elisp/settings/40.modes.el @@ -61,9 +61,6 @@ point." (defun af-python-mode-hook () ; highlight tabs in Python (make-variable-buffer-local 'font-lock-mode-hook) - (make-variable-buffer-local 'python-indent) - (if (and buffer-file-name (string-match "melange" buffer-file-name)) - (set-variable 'python-indent 2)) (af-tab-fix) (easy-menu-add-item nil '("Python") ["Run All Tests" nosetests-all t] "Comment Out Region") @@ -79,6 +76,8 @@ point." (local-set-key "\M-n" 'nosetests-module) (local-set-key "\M-\C-n" 'nosetests-one) (local-set-key (kbd "RET") 'comment-indent-new-line) + ; Match existing indentation in a file + (python-indent-guess-indent-offset) ) (add-hook 'python-mode-hook 'af-python-mode-hook)