[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 9a629a7 23/39: Add interactive flymake-start func
From: |
Jo�o T�vora |
Subject: |
[Emacs-diffs] emacs-26 9a629a7 23/39: Add interactive flymake-start function |
Date: |
Tue, 3 Oct 2017 10:04:51 -0400 (EDT) |
branch: emacs-26
commit 9a629a73e0eb10589f5befaf0a1a3290d9ba6a47
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Add interactive flymake-start function
* lisp/progmodes/flymake.el (flymake-on-timer-event)
(flymake-after-change-function, flymake-mode): Call
flymake-start.
(flymake-start): Rename from flymake--start-syntax-check.
---
lisp/progmodes/flymake.el | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 8c92dc7..282727e 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -466,7 +466,7 @@ associated `flymake-category' return DEFAULT."
(setq flymake-last-change-time nil)
(flymake-log :debug "starting syntax check after no changes for some
time")
- (flymake--start-syntax-check)))))
+ (flymake-start)))))
(define-obsolete-function-alias 'flymake-display-err-menu-for-current-line
'flymake-popup-current-error-menu "24.4")
@@ -596,15 +596,22 @@ sources."
err)
(flymake--stop-backend backend))))
-(defun flymake--start-syntax-check (&optional deferred)
+(defun flymake-start (&optional deferred interactive)
"Start a syntax check.
Start it immediately, or after current command if DEFERRED is
-non-nil."
+non-nil. With optional INTERACTIVE or interactively, clear any
+stale information about running and automatically disabled
+backends."
+ (interactive (list nil t))
(cl-labels
((start
()
(remove-hook 'post-command-hook #'start 'local)
(setq flymake-check-start-time (float-time))
+ (when interactive
+ (setq flymake--diagnostics-table (make-hash-table)
+ flymake--running-backends nil
+ flymake--disabled-backends nil))
(dolist (backend flymake-diagnostic-functions)
(cond ((memq backend flymake--running-backends)
(flymake-log :debug "Backend %s still running, not restarting"
@@ -640,7 +647,7 @@ non-nil."
(setq flymake--diagnostics-table (make-hash-table))
(when flymake-start-syntax-check-on-find-file
- (flymake--start-syntax-check)))))
+ (flymake-start)))))
;; Turning the mode OFF.
(t
@@ -670,13 +677,13 @@ non-nil."
(let((new-text (buffer-substring start stop)))
(when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
(flymake-log :debug "starting syntax check as new-line has been seen")
- (flymake--start-syntax-check 'deferred))
+ (flymake-start 'deferred))
(setq flymake-last-change-time (float-time))))
(defun flymake-after-save-hook ()
(when flymake-mode
(flymake-log :debug "starting syntax check as buffer was saved")
- (flymake--start-syntax-check))) ; no more mode 3. cannot start check if
mode 3 (to temp copies) is active - (???)
+ (flymake-start)))
(defun flymake-kill-buffer-hook ()
(when flymake-timer
- [Emacs-diffs] emacs-26 54beebb 14/39: Flymake highlights GCC info/notes as detected by flymake-proc.el, (continued)
- [Emacs-diffs] emacs-26 54beebb 14/39: Flymake highlights GCC info/notes as detected by flymake-proc.el, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 f1601be 02/39: Flymake provides flymake-report re-entry point for backends, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 ae64bf1 08/39: New Flymake variable flymake-diagnostic-types-alist and much cleanup, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 6954270 03/39: Completely rewrite Flymake's subprocess output processing, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 f930963 18/39: Simplify Flymake logging and erroring, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 734aa88 09/39: Flymake's flymake-proc.el parses column numbers from gcc/javac errors, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 9f8ad13 07/39: Refactor Flymake tests in preparation for more tests, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 491cc4a 13/39: Flymake checks file names before considering diagnostics, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 7787988 10/39: Flymake warning face easier to distinguish, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 5ec7d73 19/39: Flymake's flymake-proc.el backend slightly easier to debug, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 9a629a7 23/39: Add interactive flymake-start function,
Jo�o T�vora <=
- [Emacs-diffs] emacs-26 b0bb181 15/39: Protect Flymake's eager checks against commands like fill-paragraph, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 b2f8b8b 16/39: More Flymake cleanup before advancing to backend redesign, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 22a7372 31/39: Flymake uses proper idle timers, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 87993cd 28/39: Explicitly add a(n empty) keymap for Flymake, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 bb8b663 04/39: Move symbols in flymake-proc.el to separate namespace, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 483f1e8 22/39: A couple of Flymake backends for emacs-lisp-mode, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 5235eaf 25/39: Treat Flymake errors as just another type of diagnostic, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 8118f0f 24/39: Fix three Flymake bugs when checking C header files, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 e0df7b9 21/39: Fancy Flymake mode-line construct displays status, Jo�o T�vora, 2017/10/03
- [Emacs-diffs] emacs-26 cd39edb 26/39: Remove old flymake-display-err-menu-for-current-line, it's useless, Jo�o T�vora, 2017/10/03