From db19f4f37e9b5eba6dc979c40df553897530055a Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 21 Sep 2024 14:29:40 +0200 Subject: [PATCH] Add Python keywords "aiter" and "anext" * lisp/progmodes/python.el (python-font-lock-keywords-level-2) (python--treesit-builtins): Add "aiter" and "anext" keywords, introduced in Python 3.10. (cherry picked from commit 3cad879c9dd1a7e97dbf28045761f3dfae851136) --- lisp/progmodes/python.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1b4f5927082..2fd392c2756 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -720,7 +720,7 @@ class declarations.") "reload" "unichr" "unicode" "xrange" "apply" "buffer" "coerce" "intern" ;; Python 3: - "ascii" "breakpoint" "bytearray" "bytes" "exec" + "aiter" "anext" "ascii" "breakpoint" "bytearray" "bytes" "exec" ;; Special attributes: ;; https://docs.python.org/3/reference/datamodel.html "__annotations__" "__closure__" "__code__" @@ -1018,7 +1018,7 @@ It makes underscores and dots word constituent chars.") (defvar python--treesit-builtins (append python--treesit-builtin-types - '("abs" "all" "any" "ascii" "bin" "breakpoint" + '("abs" "aiter" "all" "anext" "any" "ascii" "bin" "breakpoint" "callable" "chr" "classmethod" "compile" "delattr" "dir" "divmod" "enumerate" "eval" "exec" "filter" "format" "getattr" "globals" -- 2.39.2