]> git.eshelyaron.com Git - emacs.git/commitdiff
Flymake: do use condition-case-unless-debug
authorJoão Távora <joaotavora@gmail.com>
Wed, 20 Sep 2023 23:05:07 +0000 (00:05 +0100)
committerJoão Távora <joaotavora@gmail.com>
Wed, 20 Sep 2023 23:05:07 +0000 (00:05 +0100)
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.

lisp/progmodes/flymake.el

index 30dc749349bd6bd5151f4c350bc8714eda20cb17..7cb1f222c22d6a2ed7deb045131c469f30f67d9f 100644 (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