aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index b350b5dadf9..5f85fecf016 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -7071,6 +7071,11 @@ implementations: `python-mode' and `python-ts-mode'."
7071 (setq-local electric-indent-inhibit t) 7071 (setq-local electric-indent-inhibit t)
7072 (setq-local electric-indent-chars 7072 (setq-local electric-indent-chars
7073 (cons ?: electric-indent-chars)) 7073 (cons ?: electric-indent-chars))
7074 (setq-local electric-layout-rules
7075 `((?: . ,(lambda ()
7076 (and (zerop (car (syntax-ppss)))
7077 (python-info-statement-starts-block-p)
7078 'after)))))
7074 7079
7075 ;; Add """ ... """ pairing to electric-pair-mode. 7080 ;; Add """ ... """ pairing to electric-pair-mode.
7076 (add-hook 'post-self-insert-hook 7081 (add-hook 'post-self-insert-hook