aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorColin Woodbury2022-03-12 18:46:55 +0100
committerLars Ingebrigtsen2022-03-12 18:46:55 +0100
commit139042eb8629e6fd49b2c3002a8fc4d1aabd174d (patch)
tree99f6a842c052bbe858a85d96c6e86c5003cce8ed /lisp/progmodes/python.el
parentf143fcc0ed15fdaae65e14fd9280b2f5faac2c0a (diff)
downloademacs-139042eb8629e6fd49b2c3002a8fc4d1aabd174d.tar.gz
emacs-139042eb8629e6fd49b2c3002a8fc4d1aabd174d.zip
* lisp/progmodes/python.el: Account for new keywords.
* 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).
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index d83290fe457..c4d8b123a86 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -563,6 +563,8 @@ class declarations.")
563 ;; Python 3.5+ PEP492 563 ;; Python 3.5+ PEP492
564 (and "async" (+ space) (or "def" "for" "with")) 564 (and "async" (+ space) (or "def" "for" "with"))
565 "await" 565 "await"
566 ;; Python 3.10+
567 "match" "case"
566 ;; Extra: 568 ;; Extra:
567 "self") 569 "self")
568 symbol-end) 570 symbol-end)