From 69ec168c7b2644707ef4f2997c5d2e6f1f408728 Mon Sep 17 00:00:00 2001 From: Kazu Yamamoto Date: Tue, 8 Apr 2014 13:42:41 +0900 Subject: [PATCH] errors over warnings (#212). --- elisp/ghc-check.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/elisp/ghc-check.el b/elisp/ghc-check.el index 00ea0ed..290aca3 100644 --- a/elisp/ghc-check.el +++ b/elisp/ghc-check.el @@ -152,8 +152,13 @@ nil does not display errors/warnings. (let ((ovls (ghc-check-overlay-at (point)))) (when ovls (let ((msgs (mapcar (lambda (ovl) (overlay-get ovl 'ghc-msg)) ovls)) - (file (overlay-get (car ovls) 'ghc-file))) - (ghc-make-file-msgs :file file :msgs msgs))))) + (file (overlay-get (car ovls) 'ghc-file)) + errs wrns) + (dolist (msg msgs) + (if (string-match "^Warning" msg) + (setq wrns (cons msg wrns)) + (setq errs (cons msg errs)))) + (ghc-make-file-msgs :file file :msgs (nconc errs wrns)))))) (defun ghc-display-errors () (interactive)