]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/progmodes/python.el: Account for new keywords.
authorColin Woodbury <colin@fosskers.ca>
Sat, 12 Mar 2022 17:46:55 +0000 (18:46 +0100)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 12 Mar 2022 17:46:55 +0000 (18:46 +0100)
* lisp/progmodes/python.el (python-font-lock-keywords-level-2): As
of Python 3.10, Python has structured pattern matching. This adds
two new keywords which need to be highlighted (bug#54345).

lisp/progmodes/python.el

index d83290fe457bb708c75d4776dacaa86011219872..c4d8b123a8672bf270355e858195133f881af6ec 100644 (file)
@@ -563,6 +563,8 @@ class declarations.")
           ;; Python 3.5+ PEP492
           (and "async" (+ space) (or "def" "for" "with"))
           "await"
+          ;; Python 3.10+
+          "match" "case"
           ;; Extra:
           "self")
          symbol-end)