el/dot-emacs.el: Add the additional Python 3 keywords and builtins.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 17 Feb 2024 13:15:59 +0000 (13:15 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 17 Feb 2024 14:55:46 +0000 (14:55 +0000)
el/dot-emacs.el

index 7c58433..4d26b85 100644 (file)
@@ -3474,20 +3474,22 @@ strip numbers instead."
 
 (defun mdw-fontify-python ()
   (mdw-fontify-pythonic
-   (mdw-regexps "and" "as" "assert"
+   (mdw-regexps "and" "as" "assert" "async" "await"
                "break"
-               "class" "continue"
+               "case" "class" "continue"
                "def" "del"
-               "elif" "else" "except" "exec"
+               "elif" "else" "except" ;"exec"
                "finally" "for" "from"
                "global"
                "if" "import" "in" "is"
                "lambda"
+               "match"
+               "nonlocal"
                "not"
                "or"
-               "pass" "print"
+               "pass" ;"print"
                "raise" "return"
-               "try"
+               "try" ;"type"
                "while" "with"
                "yield")
 
@@ -3498,6 +3500,7 @@ strip numbers instead."
                "__debug__"
 
                "BaseException"
+                 "BaseExceptionGroup"
                  "Exception"
                    "StandardError"
                      "ArithmeticError"
@@ -3510,8 +3513,24 @@ strip numbers instead."
                      "EnvironmentError"
                        "IOError"
                        "OSError"
+                         "BlockingIOError"
+                         "ChildProcessError"
+                         "ConnectionError"
+                           "BrokenPipeError"
+                           "ConnectionAbortedError"
+                           "ConnectionRefusedError"
+                           "ConnectionResetError"
+                         "FileExistsError"
+                         "FileNotFoundError"
+                         "InterruptedError"
+                         "IsADirectoryError"
+                         "NotADirectoryError"
+                         "PermissionError"
+                         "TimeoutError"
                      "EOFError"
+                     "ExceptionGroup"
                      "ImportError"
+                       "ModuleNotFoundError"
                      "LookupError"
                        "IndexError"
                        "KeyError"
@@ -3521,6 +3540,7 @@ strip numbers instead."
                      "ReferenceError"
                      "RuntimeError"
                        "NotImplementedError"
+                       "RecursionError"
                      "SyntaxError"
                        "IndentationError"
                          "TabError"
@@ -3535,9 +3555,11 @@ strip numbers instead."
                    "Warning"
                      "BytesWarning"
                      "DeprecationWarning"
+                     "EncodingWarning"
                      "FutureWarning"
                      "ImportWarning"
                      "PendingDeprecationWarning"
+                     "ResourceWarning"
                      "RuntimeWarning"
                      "SyntaxWarning"
                      "UnicodeWarning"
@@ -3546,12 +3568,14 @@ strip numbers instead."
                  "KeyboardInterrupt"
                  "SystemExit"
 
-               "abs" "absolute_import" "all" "any" "apply"
-               "basestring" "bin" "bool" "buffer" "bytearray"
+               "abs" "absolute_import" "aiter"
+                 "all" "anext" "any" "apply" "ascii"
+               "basestring" "bin" "bool" "breakpoint"
+                 "buffer" "bytearray" "bytes"
                "callable" "coerce" "chr" "classmethod"
                  "cmp" "compile" "complex"
                "delattr" "dict" "dir" "divmod"
-               "enumerate" "eval" "execfile"
+               "enumerate" "eval" "exec" "execfile"
                "file" "filter" "float" "format" "frozenset"
                "getattr" "globals"
                "hasattr" "hash" "help" "hex"