(py-electric-colon): don't re-indent the line if it starts in column

zero
This commit is contained in:
Barry Warsaw 1995-03-14 23:59:07 +00:00
parent 464c94af2a
commit 9b623b3d63

View file

@ -433,11 +433,15 @@ argument is provided, that many colons are inserted non-electrically."
(py-compute-indentation)))
)
(setq outdent py-indent-offset))
(goto-char here)
(beginning-of-line)
(delete-horizontal-space)
(indent-to (- indent outdent))
)))
;; 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
(goto-char here)
(beginning-of-line)
(delete-horizontal-space)
(indent-to (- indent outdent))
))))
;;; Functions that execute Python commands in a subprocess