* bug#44572: [PATCH] Fix regression from 296e4dd
@ 2020-11-11 11:11 Dario Gjorgjevski
2020-11-11 11:28 ` Lars Ingebrigtsen
0 siblings, 1 reply; 2+ messages in thread
From: Dario Gjorgjevski @ 2020-11-11 11:11 UTC (permalink / raw)
To: 44572
[-- Attachment #1: Type: text/plain, Size: 129 bytes --]
‘symbol-name’ should not be quantified by a ‘+’ as it is redundant and
performs very badly.
Sorry for the mishap!
[-- Attachment #2: Fix regression from 296e4dd --]
[-- Type: text/x-diff, Size: 2461 bytes --]
From e8b6bdff94a4c997eabc332b39a9d009762ae247 Mon Sep 17 00:00:00 2001
From: Dario Gjorgjevski <dario.gjorgjevski@gmail.com>
Date: Wed, 11 Nov 2020 12:07:04 +0100
Subject: [PATCH] Fix regression from 296e4dd
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
‘symbol-name’ should not be quantified by a ‘+’ as it is redundant and
performs very badly.
---
lisp/progmodes/python.el | 19 ++++++++-----------
1 file changed, 8 insertions(+), 11 deletions(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index eb84b494e3..a179318589 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -662,14 +662,11 @@ python-font-lock-keywords-maximum-decoration
;; assignments
;; support for a = b = c = 5
(,(lambda (limit)
- (let ((re (python-rx (group (+ symbol-name))
- (? ?\[ (+ (not ?\])) ?\])
- (* space)
- ;; A type, like " : int ".
- (? ?:
- (* space)
- (+ not-simple-operator)
- (* space))
+ (let ((re (python-rx (group symbol-name)
+ ;; subscript, like "[5]"
+ (? ?\[ (+ (not ?\])) ?\]) (* space)
+ ;; type hint, like ": int" or ": Mapping[int, str]"
+ (? ?: (* space) (+ not-simple-operator) (* space))
assignment-operator))
(res nil))
(while (and (setq res (re-search-forward re limit t))
@@ -679,9 +676,9 @@ python-font-lock-keywords-maximum-decoration
(1 font-lock-variable-name-face nil nil))
;; support for a, b, c = (1, 2, 3)
(,(lambda (limit)
- (let ((re (python-rx (group (+ symbol-name)) (* space)
- (* ?, (* space) (+ symbol-name) (* space))
- ?, (* space) (+ symbol-name) (* space)
+ (let ((re (python-rx (group symbol-name) (* space)
+ (* ?, (* space) symbol-name (* space))
+ ?, (* space) symbol-name (* space)
assignment-operator))
(res nil))
(while (and (setq res (re-search-forward re limit t))
--
2.28.0
[-- Attachment #3: Type: text/plain, Size: 149 bytes --]
Best regards,
Dario
--
$ keyserver=hkps://hkps.pool.sks-keyservers.net
$ keyid=744A4F0B4F1C9371
$ gpg --keyserver $keyserver --search-keys $keyid
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#44572: [PATCH] Fix regression from 296e4dd
2020-11-11 11:11 bug#44572: [PATCH] Fix regression from 296e4dd Dario Gjorgjevski
@ 2020-11-11 11:28 ` Lars Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Ingebrigtsen @ 2020-11-11 11:28 UTC (permalink / raw)
To: Dario Gjorgjevski; +Cc: 44572
Dario Gjorgjevski <dario.gjorgjevski@gmail.com> writes:
> ‘symbol-name’ should not be quantified by a ‘+’ as it is redundant and
> performs very badly.
>
> Sorry for the mishap!
No prob; pushed to the trunk.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-11 11:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11 11:11 bug#44572: [PATCH] Fix regression from 296e4dd Dario Gjorgjevski
2020-11-11 11:28 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.