diff options
| author | Stefan Kangas | 2024-09-21 14:13:47 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2024-09-21 14:20:29 +0200 |
| commit | 7aa5876cdf3df3ac0fa67a1dd06b49077dd0b8cf (patch) | |
| tree | 44ab09eb6ea6f7298f26d364a3aade84b000ba54 /lisp/progmodes/python.el | |
| parent | 29a760711731ce49965079e72d76b26ef3b7bcb4 (diff) | |
| download | emacs-7aa5876cdf3df3ac0fa67a1dd06b49077dd0b8cf.tar.gz emacs-7aa5876cdf3df3ac0fa67a1dd06b49077dd0b8cf.zip | |
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".
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0bf8b0c9e73..a767ac6230c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -789,11 +789,12 @@ sign in chained assignment." | |||
| 789 | ;; Python 3: | 789 | ;; Python 3: |
| 790 | "BlockingIOError" "BrokenPipeError" "ChildProcessError" | 790 | "BlockingIOError" "BrokenPipeError" "ChildProcessError" |
| 791 | "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" | 791 | "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" |
| 792 | "ConnectionResetError" "FileExistsError" "FileNotFoundError" | 792 | "ConnectionResetError" "EncodingWarning" "FileExistsError" |
| 793 | "InterruptedError" "IsADirectoryError" "NotADirectoryError" | 793 | "FileNotFoundError" "InterruptedError" "IsADirectoryError" |
| 794 | "PermissionError" "ProcessLookupError" "RecursionError" | 794 | "NotADirectoryError" "ModuleNotFoundError" "PermissionError" |
| 795 | "ProcessLookupError" "PythonFinalizationError" "RecursionError" | ||
| 795 | "ResourceWarning" "StopAsyncIteration" "TimeoutError" | 796 | "ResourceWarning" "StopAsyncIteration" "TimeoutError" |
| 796 | "ExceptionGroup" | 797 | "BaseExceptionGroup" "ExceptionGroup" |
| 797 | ;; OS specific | 798 | ;; OS specific |
| 798 | "VMSError" "WindowsError" | 799 | "VMSError" "WindowsError" |
| 799 | ) | 800 | ) |
| @@ -1063,11 +1064,12 @@ It makes underscores and dots word constituent chars.") | |||
| 1063 | ;; Python 3: | 1064 | ;; Python 3: |
| 1064 | "BlockingIOError" "BrokenPipeError" "ChildProcessError" | 1065 | "BlockingIOError" "BrokenPipeError" "ChildProcessError" |
| 1065 | "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" | 1066 | "ConnectionAbortedError" "ConnectionError" "ConnectionRefusedError" |
| 1066 | "ConnectionResetError" "FileExistsError" "FileNotFoundError" | 1067 | "ConnectionResetError" "EncodingWarning" "FileExistsError" |
| 1067 | "InterruptedError" "IsADirectoryError" "NotADirectoryError" | 1068 | "FileNotFoundError" "InterruptedError" "IsADirectoryError" |
| 1068 | "PermissionError" "ProcessLookupError" "RecursionError" | 1069 | "NotADirectoryError" "ModuleNotFoundError" "PermissionError" |
| 1070 | "ProcessLookupError" "PythonFinalizationError" "RecursionError" | ||
| 1069 | "ResourceWarning" "StopAsyncIteration" "TimeoutError" | 1071 | "ResourceWarning" "StopAsyncIteration" "TimeoutError" |
| 1070 | "ExceptionGroup" | 1072 | "BaseExceptionGroup" "ExceptionGroup" |
| 1071 | ;; OS specific | 1073 | ;; OS specific |
| 1072 | "VMSError" "WindowsError" | 1074 | "VMSError" "WindowsError" |
| 1073 | )) | 1075 | )) |