]> git.eshelyaron.com Git - emacs.git/commitdiff
Protect Flymake checkdoc backend against checkdoc errors (bug#29176)
authorJoão Távora <joaotavora@gmail.com>
Thu, 9 Nov 2017 20:44:11 +0000 (20:44 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 9 Nov 2017 20:45:05 +0000 (20:45 +0000)
The function checkdoc-current-buffer may error if there are unbalanced
parens, for example, but this shouldn't disable the
elisp-flymake-checkdoc backend.

* lisp/progmodes/elisp-mode.el (elisp-flymake-checkdoc): Use
ignore-errors.

lisp/progmodes/elisp-mode.el

index 41415943a58eaa97f3fe2985b933cd8b0bf49dc0..5ba097890974e03dd20a6cdd47c5cc63ecdfcec3 100644 (file)
@@ -1615,7 +1615,11 @@ Calls REPORT-FN directly."
             (generate-new-buffer " *checkdoc-temp*")))
       (unwind-protect
           (save-excursion
-            (checkdoc-current-buffer t))
+            ;; checkdoc-current-buffer can error if there are
+            ;; unbalanced parens, for example, but this shouldn't
+            ;; disable the backend (bug#29176).
+            (ignore-errors
+              (checkdoc-current-buffer t)))
         (kill-buffer checkdoc-diagnostic-buffer)))
     (funcall report-fn
              (cl-loop for (text start end _unfixable) in