]> git.eshelyaron.com Git - emacs.git/commitdiff
Add Python keywords "aiter" and "anext"
authorStefan Kangas <stefankangas@gmail.com>
Sat, 21 Sep 2024 12:29:40 +0000 (14:29 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Sep 2024 10:45:27 +0000 (12:45 +0200)
* 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

index 1b4f59270824b8d07ba478205dec0b93bfc65542..2fd392c27563a84bb6a08b0737dfacb187fc45a5 100644 (file)
@@ -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"