diff options
author | Barry Warsaw <barry@python.org> | 1995-03-15 18:19:15 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1995-03-15 18:19:15 (GMT) |
commit | a6a714eb3babc4e571232ce9c3cf96b3eafb8cd4 (patch) | |
tree | 6d337c9832ce119d31ebbe85ce360cb28309d51d /Misc/python-mode.el | |
parent | 1a6c82f1e63b97c37f3362d9d91195bab203a923 (diff) | |
download | cpython-a6a714eb3babc4e571232ce9c3cf96b3eafb8cd4.zip cpython-a6a714eb3babc4e571232ce9c3cf96b3eafb8cd4.tar.gz cpython-a6a714eb3babc4e571232ce9c3cf96b3eafb8cd4.tar.bz2 |
(py-electric-colon): don't indent, only outdent.
Diffstat (limited to 'Misc/python-mode.el')
-rw-r--r-- | Misc/python-mode.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index be08e00..15c62a6 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -436,10 +436,12 @@ argument is provided, that many colons are inserted non-electrically." (py-compute-indentation))) ) (setq outdent py-indent-offset)) - ;; electric colon won't re-indent lines that start in column - ;; zero. you'd have to use TAB for that. TBD: Is there a - ;; better way to determine this??? - (if (zerop (current-indentation)) nil + ;; electric colon won't re-indent lines that start to the left + ;; of the current computed indentation, under the assumption + ;; that these are already outdented properly. Use TAB, C-c C-l + ;; or C-c C-r to adjust. TBD: Is there a better way to + ;; determine this??? + (if (< (current-indentation) indent) nil (goto-char here) (beginning-of-line) (delete-horizontal-space) |