From: Stefan Kangas Date: Sat, 21 Sep 2024 12:13:47 +0000 (+0200) Subject: Add all exceptions up to Python 3.13 as keywords X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=27a726ffe1b730125062b04a7469819dabc0630c;p=emacs.git Add all exceptions up to Python 3.13 as keywords * lisp/progmodes/python.el (python-font-lock-keywords-maximum-decoration) (python--treesit-exceptions): Add all built-in exceptions in Python 3.13 as keywords. Missing from the list was "BaseExceptionGroup", "EncodingWarning", "ModuleNotFoundError", and "PythonFinalizationError". (cherry picked from commit 7aa5876cdf3df3ac0fa67a1dd06b49077dd0b8cf) --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index cd8befdb1d5..1b4f5927082 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -789,11 +789,12 @@ sign in chained assignment." ;; Python 3: "BlockingIOError" "BrokenPipeError" "ChildProcessError" "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" - "ConnectionResetError" "FileExistsError" "FileNotFoundError" - "InterruptedError" "IsADirectoryError" "NotADirectoryError" - "PermissionError" "ProcessLookupError" "RecursionError" + "ConnectionResetError" "EncodingWarning" "FileExistsError" + "FileNotFoundError" "InterruptedError" "IsADirectoryError" + "NotADirectoryError" "ModuleNotFoundError" "PermissionError" + "ProcessLookupError" "PythonFinalizationError" "RecursionError" "ResourceWarning" "StopAsyncIteration" "TimeoutError" - "ExceptionGroup" + "BaseExceptionGroup" "ExceptionGroup" ;; OS specific "VMSError" "WindowsError" ) @@ -1063,11 +1064,12 @@ It makes underscores and dots word constituent chars.") ;; Python 3: "BlockingIOError" "BrokenPipeError" "ChildProcessError" "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" - "ConnectionResetError" "FileExistsError" "FileNotFoundError" - "InterruptedError" "IsADirectoryError" "NotADirectoryError" - "PermissionError" "ProcessLookupError" "RecursionError" + "ConnectionResetError" "EncodingWarning" "FileExistsError" + "FileNotFoundError" "InterruptedError" "IsADirectoryError" + "NotADirectoryError" "ModuleNotFoundError" "PermissionError" + "ProcessLookupError" "PythonFinalizationError" "RecursionError" "ResourceWarning" "StopAsyncIteration" "TimeoutError" - "ExceptionGroup" + "BaseExceptionGroup" "ExceptionGroup" ;; OS specific "VMSError" "WindowsError" ))