From 7cff9c4498f520fc60f30864e6e165e4505e66d8 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Wed, 26 Oct 2016 16:09:42 -0400 Subject: [PATCH] fix(emacs): clear error messages in next-error-mode --- src/emacs/lean-flycheck.el | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/emacs/lean-flycheck.el b/src/emacs/lean-flycheck.el index f7aef288bf..3a368f38aa 100644 --- a/src/emacs/lean-flycheck.el +++ b/src/emacs/lean-flycheck.el @@ -119,14 +119,13 @@ (e (get-char-property pos 'flycheck-error))) (setq errors (list e)))) - (when errors - (with-output-to-lean-info - (dolist (e errors) - (princ (format "%d:%d: " (flycheck-error-line e) (flycheck-error-column e))) - (princ (flycheck-error-message e)) - (princ "\n\n")) - (when flycheck-current-errors - (princ (format "(%d more messages above...)" (length flycheck-current-errors))))))))) + (with-output-to-lean-info + (dolist (e errors) + (princ (format "%d:%d: " (flycheck-error-line e) (flycheck-error-column e))) + (princ (flycheck-error-message e)) + (princ "\n\n")) + (when flycheck-current-errors + (princ (format "(%d more messages above...)" (length flycheck-current-errors)))))))) (define-minor-mode lean-next-error-mode "Toggle lean-next-error-mode on and off.