]> git.eshelyaron.com Git - emacs.git/commitdiff
Revert "python: Better support := in electric-layout-mode"
authorEshel Yaron <me@eshelyaron.com>
Sun, 6 Oct 2024 07:00:04 +0000 (09:00 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 6 Oct 2024 07:00:04 +0000 (09:00 +0200)
This reverts commit 02e5cc293a93994bf52d5e0b911f2e4733c5bb20.

etc/NEWS
lisp/progmodes/python.el

index 41e12b367b6152f0d9138e143d89247a15ddeb3e..6674ab9d5ea1e56315dfe193bebe947e6f84694e 100644 (file)
--- 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'.
-
 \f
 * New Modes and Packages in Emacs 31.1
 
index 70a6117dc700964a0956b4256a1778e24f3f3613..f66e3a1724ea880f721ad2f2203dc4a972e1d5cc 100644 (file)
@@ -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.