aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/flymake.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index fddc13f56b1..460af718aad 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -4,7 +4,7 @@
4 4
5;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> 5;; Author: Pavel Kobyakov <pk_at_work@yahoo.com>
6;; Maintainer: João Távora <joaotavora@gmail.com> 6;; Maintainer: João Távora <joaotavora@gmail.com>
7;; Version: 1.1.0 7;; Version: 1.1.1
8;; Keywords: c languages tools 8;; Keywords: c languages tools
9;; Package-Requires: ((emacs "26.1") (eldoc "1.1.0")) 9;; Package-Requires: ((emacs "26.1") (eldoc "1.1.0"))
10 10
@@ -1283,6 +1283,8 @@ correctly.")
1283 (when (flymake-running-backends) flymake-mode-line-counter-format)) 1283 (when (flymake-running-backends) flymake-mode-line-counter-format))
1284 1284
1285(defun flymake--mode-line-counter (type &optional no-space) 1285(defun flymake--mode-line-counter (type &optional no-space)
1286 "Compute number of diagnostics in buffer with TYPE's severity.
1287TYPE is usually keyword `:error', `:warning' or `:note'."
1286 (let ((count 0) 1288 (let ((count 0)
1287 (face (flymake--lookup-type-property type 1289 (face (flymake--lookup-type-property type
1288 'mode-line-face 1290 'mode-line-face
@@ -1290,7 +1292,8 @@ correctly.")
1290 (maphash (lambda 1292 (maphash (lambda
1291 (_b state) 1293 (_b state)
1292 (dolist (d (flymake--backend-state-diags state)) 1294 (dolist (d (flymake--backend-state-diags state))
1293 (when (eq type (flymake--diag-type d)) 1295 (when (= (flymake--severity type)
1296 (flymake--severity (flymake--diag-type d)))
1294 (cl-incf count)))) 1297 (cl-incf count))))
1295 flymake--backend-state) 1298 flymake--backend-state)
1296 (when (or (cl-plusp count) 1299 (when (or (cl-plusp count)