mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
(py-electric-colon): don't re-indent the line if it starts in column
zero
This commit is contained in:
parent
464c94af2a
commit
9b623b3d63
1 changed files with 9 additions and 5 deletions
|
|
@ -433,11 +433,15 @@ argument is provided, that many colons are inserted non-electrically."
|
||||||
(py-compute-indentation)))
|
(py-compute-indentation)))
|
||||||
)
|
)
|
||||||
(setq outdent py-indent-offset))
|
(setq outdent py-indent-offset))
|
||||||
(goto-char here)
|
;; electric colon won't re-indent lines that start in column
|
||||||
(beginning-of-line)
|
;; zero. you'd have to use TAB for that. TBD: Is there a
|
||||||
(delete-horizontal-space)
|
;; better way to determine this???
|
||||||
(indent-to (- indent outdent))
|
(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
|
;;; Functions that execute Python commands in a subprocess
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue