Improve general compatibility of flymake segment
This commit is contained in:
parent
060959f5e2
commit
bcd8725b21
@ -77,6 +77,7 @@
|
|||||||
|
|
||||||
(declare-function flymake-running-backends "flymake" ())
|
(declare-function flymake-running-backends "flymake" ())
|
||||||
(declare-function flymake-reporting-backends "flymake" ())
|
(declare-function flymake-reporting-backends "flymake" ())
|
||||||
|
(declare-function flymake--lookup-type-property "flymake" (type prop &optional default))
|
||||||
|
|
||||||
(declare-function mood-line-segment-indentation--segment "mood-line-segment-indentation" ())
|
(declare-function mood-line-segment-indentation--segment "mood-line-segment-indentation" ())
|
||||||
|
|
||||||
@ -571,7 +572,8 @@ Counts will be returned in an alist as the `cdr' of the following keys:
|
|||||||
"Return count of current flymake reports of TYPE."
|
"Return count of current flymake reports of TYPE."
|
||||||
(let ((count 0))
|
(let ((count 0))
|
||||||
(dolist (d (flymake-diagnostics))
|
(dolist (d (flymake-diagnostics))
|
||||||
(when (eq (cl-struct-slot-value 'flymake--diag 'type d) type)
|
(when (eq (flymake--lookup-type-property (flymake-diagnostic-type d) 'severity)
|
||||||
|
(flymake--lookup-type-property type 'severity))
|
||||||
(cl-incf count)))
|
(cl-incf count)))
|
||||||
count))
|
count))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user