From 8a0069f5659cfb24bcc6eb23ff18bf7f8f8c85d8 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Sat, 17 Feb 2024 13:15:59 +0000 Subject: [PATCH] el/dot-emacs.el: Add the additional Python 3 keywords and builtins. --- el/dot-emacs.el | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 7c58433..4d26b85 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -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" -- 2.11.0