[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 a458e1a 26/3
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 a458e1a 26/39: Treat flymake errors as just another type of diagnostic |
Date: |
Mon, 2 Oct 2017 20:12:25 -0400 (EDT) |
branch: scratch/flymake-refactor-cleaner-for-emacs-26
commit a458e1a163d87f8d05642e305b965b4fbd0961cb
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.el (flymake--diag-errorp): Remove.
(flymake--handle-report, flymake-popup-current-error-menu):
Don't use it.
---
lisp/progmodes/flymake.el | 24 +++++++-----------------
1 file changed, 7 insertions(+), 17 deletions(-)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index e5b1e2c..cd1c480 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -400,13 +400,6 @@ associated `flymake-category' 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
@@ -494,10 +487,9 @@ associated `flymake-category' 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 :debug "choice=%s" choice)
;; FIXME: What is the point of going to the problem locus if we're
@@ -559,13 +551,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-cleaner-for-emacs-26 555bea3 11/39: Protect against timer triggers when no flymake-mode, (continued)
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 555bea3 11/39: Protect against timer triggers when no flymake-mode, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 da45044 09/39: Flymake's flymake-proc.el parses column numbers from gcc/javac errors, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 9357120 13/39: Echo Flymake error messages when navigating errors interactively, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 86a4f30 07/39: Refactor flymake-tests.el in preparation for more tests, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 8f50239 12/39: Add a new Flymake test for multiple errors and warnings, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 4f7d568 14/39: Flymake checks file names before considering diagnostics, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 0a4e420 16/39: Protect Flymake's eager checks against commands like fill-paragraph, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 c8004c6 03/39: Completely rewrite Flymake's subprocess output processing, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2b48161 21/39: Tweak Flymake commands flymake-goto-[next/prev]-error, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2dd9e04 24/39: Add interactive flymake-start function, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 a458e1a 26/39: Treat flymake errors as just another type of diagnostic,
João Távora <=
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 4ae24d7 20/39: Flymake's flymake-proc.el backend slightly easier to debug, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 4d6d56d 27/39: Remove old flymake-display-err-menu-for-current-line, it's useless, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 ef67227 29/39: Explicitly add a(n empty) keymap for Flymake, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2b735b4 08/39: New Flymake variable flymake-diagnostic-types-alist and much cleanup, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 2971cd0 38/39: Minimal tweak as an attempt to future-proof Flymake API, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 c1661fc 36/39: Hook Flymake onto proper checkdoc and byte-compile interfaces, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 38fdbd6 34/39: Capitalize "Flymake" in docstrings and comments, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 b80d29d 39/39: Start rewriting Flymake manual, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 b4099cb 18/39: New Flymake API variable flymake-diagnostic-functions, João Távora, 2017/10/02
- [Emacs-diffs] scratch/flymake-refactor-cleaner-for-emacs-26 a506cc6 25/39: Fix three Flymake bugs when checking C header files, João Távora, 2017/10/02