diff options
| author | João Távora | 2023-09-21 00:05:07 +0100 |
|---|---|---|
| committer | João Távora | 2023-09-21 00:05:07 +0100 |
| commit | 4da3ff1f0cc4eec6fa3780a73edb428f5b1e898a (patch) | |
| tree | 3f3db3ba5f24fb7fe12625854720bb3d08da35b5 | |
| parent | 8b1947ffdd9d9eae26a308f0abaac45e06baac22 (diff) | |
| download | emacs-4da3ff1f0cc4eec6fa3780a73edb428f5b1e898a.tar.gz emacs-4da3ff1f0cc4eec6fa3780a73edb428f5b1e898a.zip | |
Flymake: do use condition-case-unless-debug
The reasons previously highlighted in the FIXME either don't apply
anymore or don't outweigh the advantages of using this macro.
* lisp/progmodes/flymake.el (flymake--run-backend): Do use
condition-case-unless-debug.
| -rw-r--r-- | lisp/progmodes/flymake.el | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index 30dc749349b..7cb1f222c22 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -1120,15 +1120,7 @@ with a report function." | |||
| 1120 | (setf (flymake--state-running state) run-token | 1120 | (setf (flymake--state-running state) run-token |
| 1121 | (flymake--state-disabled state) nil | 1121 | (flymake--state-disabled state) nil |
| 1122 | (flymake--state-reported-p state) nil)) | 1122 | (flymake--state-reported-p state) nil)) |
| 1123 | ;; FIXME: Should use `condition-case-unless-debug' here, but don't | 1123 | (condition-case-unless-debug err |
| 1124 | ;; for two reasons: (1) that won't let me catch errors from inside | ||
| 1125 | ;; `ert-deftest' where `debug-on-error' appears to be always | ||
| 1126 | ;; t. (2) In cases where the user is debugging elisp somewhere | ||
| 1127 | ;; else, and using flymake, the presence of a frequently | ||
| 1128 | ;; misbehaving backend in the global hook (most likely the legacy | ||
| 1129 | ;; backend) will trigger an annoying backtrace. | ||
| 1130 | ;; | ||
| 1131 | (condition-case err | ||
| 1132 | (apply backend (flymake-make-report-fn backend run-token) | 1124 | (apply backend (flymake-make-report-fn backend run-token) |
| 1133 | args) | 1125 | args) |
| 1134 | (error | 1126 | (error |