[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 0e6635f: Fix Flymake's diagnostic count with custom
From: |
João Távora |
Subject: |
[Emacs-diffs] master 0e6635f: Fix Flymake's diagnostic count with custom error types |
Date: |
Mon, 29 Oct 2018 07:52:10 -0400 (EDT) |
branch: master
commit 0e6635fdb9ad34dea0540c121c8b981a4fc14832
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Fix Flymake's diagnostic count with custom error types
Fixes: bug#33187
* lisp/progmodes/flymake.el (flymake--mode-line-format): Replace
cl-union with iterative cl-pushnew.
---
lisp/progmodes/flymake.el | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 5831301..f0f93f1 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1183,20 +1183,17 @@ default) no filter is applied."
,@(unless (or all-disabled
(null known))
(cl-loop
- for (type . severity)
- in (cl-sort (mapcar (lambda (type)
- (cons type (flymake--severity type)))
- (cl-union (hash-table-keys diags-by-type)
- '(:error :warning)
- :key #'flymake--severity))
- #'>
- :key #'cdr)
+ with types = (hash-table-keys diags-by-type)
+ with _augmented = (cl-loop for extra in '(:error :warning)
+ do (cl-pushnew extra types
+ :key #'flymake--severity))
+ for type in (cl-sort types #'> :key #'flymake--severity)
for diags = (gethash type diags-by-type)
for face = (flymake--lookup-type-property type
'mode-line-face
'compilation-error)
- when (or diags
- (>= severity (warning-numeric-level :warning)))
+ when (or diags (>= (flymake--severity type)
+ (warning-numeric-level :warning)))
collect `(:propertize
,(format "%d" (length diags))
face ,face
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 0e6635f: Fix Flymake's diagnostic count with custom error types,
João Távora <=