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, 2 insertions, 3 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 493eab5e611..2f8d506fc60 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -7073,11 +7073,10 @@ implementations: `python-mode' and `python-ts-mode'."
7073 `((?: . ,(lambda () 7073 `((?: . ,(lambda ()
7074 (and (zerop (car (syntax-ppss))) 7074 (and (zerop (car (syntax-ppss)))
7075 (python-info-statement-starts-block-p) 7075 (python-info-statement-starts-block-p)
7076 ;; Heuristic: assume walrus operator := 7076 ;; Heuristic for walrus operator :=
7077 ;; when colon is preceded by space.
7078 (save-excursion 7077 (save-excursion
7079 (goto-char (- (point) 2)) 7078 (goto-char (- (point) 2))
7080 (looking-at (rx (not space) ":"))) 7079 (looking-at (rx (not space) ":" eol)))
7081 'after))))) 7080 'after)))))
7082 7081
7083 ;; Add """ ... """ pairing to electric-pair-mode. 7082 ;; Add """ ... """ pairing to electric-pair-mode.