diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-01-16 13:26:10 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-01-16 13:26:10 +0100 |
commit | 0a7ac0b5504e75275699a3d8d2d5d94bcfda8708 (patch) | |
tree | bb6158c8a9edeb1e716718abfc98dca16aef9e9e /lisp/progmodes/flymake.el | |
parent | f1efac1f9efbfa15b6434ebef507c00c1277633f (diff) | |
parent | 0732fc31932c75c682c8b65b4dcb4376ca63e8fd (diff) | |
download | emacs-0a7ac0b5504e75275699a3d8d2d5d94bcfda8708.tar.gz emacs-0a7ac0b5504e75275699a3d8d2d5d94bcfda8708.tar.bz2 emacs-0a7ac0b5504e75275699a3d8d2d5d94bcfda8708.zip |
Merge remote-tracking branch 'savannah/master' into native-comp
Diffstat (limited to 'lisp/progmodes/flymake.el')
-rw-r--r-- | lisp/progmodes/flymake.el | 7 |
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 @@ ;; Author: Pavel Kobyakov <pk_at_work@yahoo.com> ;; Maintainer: João Távora <joaotavora@gmail.com> -;; Version: 1.1.0 +;; Version: 1.1.1 ;; Keywords: c languages tools ;; Package-Requires: ((emacs "26.1") (eldoc "1.1.0")) @@ -1283,6 +1283,8 @@ correctly.") (when (flymake-running-backends) flymake-mode-line-counter-format)) (defun flymake--mode-line-counter (type &optional no-space) + "Compute number of diagnostics in buffer with TYPE's severity. +TYPE is usually keyword `:error', `:warning' or `:note'." (let ((count 0) (face (flymake--lookup-type-property type 'mode-line-face @@ -1290,7 +1292,8 @@ correctly.") (maphash (lambda (_b state) (dolist (d (flymake--backend-state-diags state)) - (when (eq type (flymake--diag-type d)) + (when (= (flymake--severity type) + (flymake--severity (flymake--diag-type d))) (cl-incf count)))) flymake--backend-state) (when (or (cl-plusp count) |