[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/flymake-refactor 820b460 35/52: Add interactive fl
From: |
João Távora |
Subject: |
[Emacs-diffs] scratch/flymake-refactor 820b460 35/52: Add interactive flymake-start function |
Date: |
Sun, 1 Oct 2017 12:40:49 -0400 (EDT) |
branch: scratch/flymake-refactor
commit 820b4604b2e6d523d6bc0b3a42c1ca92dbe7818d
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Add interactive flymake-start function
* lisp/progmodes/flymake-ui.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-ui.el | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/lisp/progmodes/flymake-ui.el b/lisp/progmodes/flymake-ui.el
index 33db296..f39ecf4 100644
--- a/lisp/progmodes/flymake-ui.el
+++ b/lisp/progmodes/flymake-ui.el
@@ -437,7 +437,7 @@ return DEFAULT."
(setq flymake-last-change-time nil)
(flymake-log 3 "starting syntax check as more than 1 second passed
since last change")
- (flymake--start-syntax-check)))))
+ (flymake-start)))))
(define-obsolete-function-alias 'flymake-display-err-menu-for-current-line
'flymake-popup-current-error-menu "24.4")
@@ -567,15 +567,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 2 "Backend %s still running, not restarting"
@@ -610,7 +617,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
@@ -641,13 +648,13 @@ non-nil."
(let((new-text (buffer-substring start stop)))
(when (and flymake-start-syntax-check-on-newline (equal new-text "\n"))
(flymake-log 3 "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 3 "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))) ; no more mode 3. cannot start check if mode 3 (to temp
copies) is active - (???)
(defun flymake-kill-buffer-hook ()
(when flymake-timer
- [Emacs-diffs] scratch/flymake-refactor bac7512 12/52: New flymake-diagnostic-types-alist and more cleanup, (continued)
- [Emacs-diffs] scratch/flymake-refactor bac7512 12/52: New flymake-diagnostic-types-alist and more cleanup, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 7140018 25/52: Protect flymake-ui against commands like fill-paragraph, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor d3168cf 09/52: Make lisp/progmodes/flymake-ui.el some 150 lines lighter, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor f3b8a72 20/52: Refactor flymake-tests.el in preparation for more tests, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 593d4303 23/52: Add a new flymake test for multiple errors and warnings, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor d68448f 26/52: More cleanup before advancing to backend redesign, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 245114e 33/52: Fix autoload conflict between flymake.el and flymake-ui.el, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 4fea8a9 30/52: Allow filtering in flymake-goto-[next/prev]-error, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 192cb7f 24/52: flymake-ui.el highlights GCC notes detected by flymake-proc.el, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 879dcef 29/52: Misc cleanup in flymake-proc.el, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 820b460 35/52: Add interactive flymake-start function,
João Távora <=
- [Emacs-diffs] scratch/flymake-refactor 8e42a5d 31/52: Cleanup some flymake-ui.el internals, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor e1b913f 36/52: Re-implement wraparound for flymake-goto-next-error, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 3dfe11c 28/52: Simplify flymake logging and erroring., João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 9329265 40/52: Treat flymake errors as just another type of diagnostic, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 38c7d4f 41/52: Remove old flymake-display-err-menu-for-current-line, it's useless, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 7a22358 34/52: A couple of new flymake backends for emacs-lisp-mode, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 9d93d46 42/52: New flymake fringe bitmaps, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 4e2cbaa 32/52: Fancy mode-line construct for flymake-mode, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 54ec5eb 47/52: Improve use of flymake-no-changes-timeout, João Távora, 2017/10/01
- [Emacs-diffs] scratch/flymake-refactor 95c126c 46/52: flymake-diagnostic-types-alist now uses flymake-category, João Távora, 2017/10/01