aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkobarity2022-04-17 19:28:15 +0200
committerLars Ingebrigtsen2022-04-17 19:28:15 +0200
commit078e1f289cfeec95db8fb0a5338383edb094e018 (patch)
treeb3730f7f4a938aafe424baea79c526035752141a
parent01282cbd801a2f09316c35fca37a7501b92992a1 (diff)
downloademacs-078e1f289cfeec95db8fb0a5338383edb094e018.tar.gz
emacs-078e1f289cfeec95db8fb0a5338383edb094e018.zip
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
-rw-r--r--lisp/progmodes/python.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index c4d8b123a86..f355055806c 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -706,7 +706,8 @@ avoid '==' being treated as an assignment."
706 ;; [a] = 5 706 ;; [a] = 5
707 ;; [*a] = 5, 6 707 ;; [*a] = 5, 6
708 (,(python-font-lock-assignment-matcher 708 (,(python-font-lock-assignment-matcher
709 (python-rx (or "[" "(") (* space) 709 (python-rx (or line-start ?\;) (* space)
710 (or "[" "(") (* space)
710 grouped-assignment-target (* space) 711 grouped-assignment-target (* space)
711 (or ")" "]") (* space) 712 (or ")" "]") (* space)
712 assignment-operator)) 713 assignment-operator))