[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 078e1f289c: Fix fontifying type hints in python-mode
From: |
Lars Ingebrigtsen |
Subject: |
master 078e1f289c: Fix fontifying type hints in python-mode |
Date: |
Sun, 17 Apr 2022 13:28:58 -0400 (EDT) |
branch: master
commit 078e1f289cfeec95db8fb0a5338383edb094e018
Author: kobarity <kobarity@gmail.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fix fontifying type hints in python-mode
* lisp/progmodes/python.el
(python-font-lock-keywords-maximum-decoration): Avoid fontifying
type hints as variable names (bug#54992).
Copyright-paperwork-exempt: yes
---
lisp/progmodes/python.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index c4d8b123a8..f355055806 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -706,7 +706,8 @@ avoid '==' being treated as an assignment."
;; [a] = 5
;; [*a] = 5, 6
(,(python-font-lock-assignment-matcher
- (python-rx (or "[" "(") (* space)
+ (python-rx (or line-start ?\;) (* space)
+ (or "[" "(") (* space)
grouped-assignment-target (* space)
(or ")" "]") (* space)
assignment-operator))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 078e1f289c: Fix fontifying type hints in python-mode,
Lars Ingebrigtsen <=