From: kobarity Date: Sun, 17 Apr 2022 17:28:15 +0000 (+0200) Subject: Fix fontifying type hints in python-mode X-Git-Tag: emacs-29.0.90~1931^2~451 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=078e1f289cfeec95db8fb0a5338383edb094e018;p=emacs.git 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 --- 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))