From 4518123f767253488f2762725d79bc8f73199030 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Sun, 6 Oct 2024 09:00:04 +0200 Subject: [PATCH] Revert "python: Better support := in electric-layout-mode" This reverts commit 02e5cc293a93994bf52d5e0b911f2e4733c5bb20. --- etc/NEWS | 3 --- lisp/progmodes/python.el | 5 ----- 2 files changed, 8 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 41e12b367b6..6674ab9d5ea 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -445,9 +445,6 @@ exist. If "python" points to Python 2 on your system, you now have to customize these variables to "python3" if you want to use Python 3 instead. ---- -*** Support 'electric-layout-mode'. - * New Modes and Packages in Emacs 31.1 diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 70a6117dc70..f66e3a1724e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -7070,11 +7070,6 @@ implementations: `python-mode' and `python-ts-mode'." `((?: . ,(lambda () (and (zerop (car (syntax-ppss))) (python-info-statement-starts-block-p) - ;; Heuristic: assume walrus operator := - ;; when colon is preceded by space. - (save-excursion - (goto-char (- (point) 2)) - (looking-at (rx (not space) ":"))) 'after))))) ;; Add """ ... """ pairing to electric-pair-mode. -- 2.39.2