[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor 9329265 3/6: Treat flymake errors
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor 9329265 3/6: Treat flymake errors as just another type of diagnostic |
Date: |
Thu, 28 Sep 2017 10:28:23 -0400 (EDT) |
branch: scratch/flymake-refactor
commit 9329265668c9355316aa69cc20dd191ed44c323f
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Treat flymake errors as just another type of diagnostic
* lisp/progmodes/flymake-ui.el (flymake--diag-errorp): Remove.
(flymake--handle-report, flymake-popup-current-error-menu):
Don't use it.
---
lisp/progmodes/flymake-ui.el | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/lisp/progmodes/flymake-ui.el b/lisp/progmodes/flymake-ui.el
index b7d5dcc..2cbb749 100644
--- a/lisp/progmodes/flymake-ui.el
+++ b/lisp/progmodes/flymake-ui.el
@@ -379,13 +379,6 @@ return DEFAULT."
(t
default))))
-(defun flymake--diag-errorp (diag)
- "Tell if DIAG is a flymake error or something else"
- (let ((sev (flymake--lookup-type-property 'severity
- (flymake--diag-type diag)
- (warning-numeric-level :error))))
- (>= sev (warning-numeric-level :error))))
-
(defun flymake--fringe-overlay-spec (bitmap)
(and flymake-fringe-indicator-position
bitmap
@@ -469,10 +462,9 @@ return DEFAULT."
(list 'mouse-1 (posn-at-point))))
(diagnostics (mapcar (lambda (ov) (overlay-get ov
'flymake--diagnostic))
diag-overlays))
- (title (format "Line %d: %d error(s), %d other(s)"
+ (title (format "Line %d: %d diagnostics(s)"
(line-number-at-pos)
- (cl-count-if #'flymake--diag-errorp diagnostics)
- (cl-count-if-not #'flymake--diag-errorp diagnostics)))
+ (length diagnostics)))
(choice (x-popup-menu event (list title (cons "" menu)))))
(flymake-log 3 "choice=%s" choice)
;; FIXME: What is the point of going to the problem locus if we're
@@ -534,13 +526,11 @@ FORCE says to handle a report even if it was not
expected."
(flymake--highlight-line diag)
(setf (flymake--diag-backend diag) backend))
diagnostics)
- (let ((err-count (cl-count-if #'flymake--diag-errorp diagnostics))
- (warn-count (cl-count-if-not #'flymake--diag-errorp
- diagnostics)))
- (when flymake-check-start-time
- (flymake-log 2 "%d error(s), %d other(s) in %.2f second(s)"
- err-count warn-count
- (- (float-time) flymake-check-start-time)))))))
+ (when flymake-check-start-time
+ (flymake-log 2 "backend %s reported %d diagnostics in %.2f second(s)"
+ backend
+ (length diagnostics)
+ (- (float-time) flymake-check-start-time))))))
(t
(flymake--disable-backend "?"
:strange
- [Emacs-diffs] scratch/flymake-refactor updated (3b6c736 -> 1116aa7), João Távora, 2017/09/28
- [Emacs-diffs] scratch/flymake-refactor 1d58e32 2/6: Fix flymake-wrap-around for buffers with no errors, João Távora, 2017/09/28
- [Emacs-diffs] scratch/flymake-refactor 9d93d46 5/6: New flymake fringe bitmaps, João Távora, 2017/09/28
- [Emacs-diffs] scratch/flymake-refactor 1116aa7 6/6: * lisp/progmodes/flymake-ui.el (flymake-mode-map): Bind "M-n" and "M-p", João Távora, 2017/09/28
- [Emacs-diffs] scratch/flymake-refactor 38c7d4f 4/6: Remove old flymake-display-err-menu-for-current-line, it's useless, João Távora, 2017/09/28
- [Emacs-diffs] scratch/flymake-refactor 7d3d3d3 1/6: Fix flymake problems when checking C header files, João Távora, 2017/09/28
- [Emacs-diffs] scratch/flymake-refactor 9329265 3/6: Treat flymake errors as just another type of diagnostic,
João Távora <=