From 078e1f289cfeec95db8fb0a5338383edb094e018 Mon Sep 17 00:00:00 2001 From: kobarity Date: Sun, 17 Apr 2022 19:28:15 +0200 Subject: [PATCH] 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 c4d8b123a86..f355055806c 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)) -- 2.39.2