mirror of
https://github.com/python/cpython.git
synced 2024-11-24 02:15:30 +08:00
(py-electric-colon): don't indent, only outdent.
This commit is contained in:
parent
1a6c82f1e6
commit
a6a714eb3b
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user