1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-03 14:10:47 -08:00

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.
This commit is contained in:
João Távora 2023-09-21 00:05:07 +01:00
parent 8b1947ffdd
commit 4da3ff1f0c

View file

@ -1120,15 +1120,7 @@ with a report function."
(setf (flymake--state-running state) run-token
(flymake--state-disabled state) nil
(flymake--state-reported-p state) nil))
;; FIXME: Should use `condition-case-unless-debug' here, but don't
;; for two reasons: (1) that won't let me catch errors from inside
;; `ert-deftest' where `debug-on-error' appears to be always
;; t. (2) In cases where the user is debugging elisp somewhere
;; else, and using flymake, the presence of a frequently
;; misbehaving backend in the global hook (most likely the legacy
;; backend) will trigger an annoying backtrace.
;;
(condition-case err
(condition-case-unless-debug err
(apply backend (flymake-make-report-fn backend run-token)
args)
(error