Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard flymake doesn't restart checking when changes are made #29

Open
dabrahams opened this issue Oct 10, 2016 · 0 comments
Open

Standard flymake doesn't restart checking when changes are made #29

dabrahams opened this issue Oct 10, 2016 · 0 comments

Comments

@dabrahams
Copy link

I'm not sure this fork has the problem, but with stock flymake, if you make a legal change (say, insert a space) and then introduce a syntax error while the first check is going, the error is never caught.

I do this to get around it:

(defun interrupting-flymake-start-syntax-check (base-function)
  (when (and (boundp 'flymake-syntax-check-process) (process-live-p flymake-syntax-check-process))
    (setq flymake-check-was-interrupted t)
    (flymake-kill-process flymake-syntax-check-process))
  (funcall base-function)
  (let ((proc (car flymake-processes)))
    (set-process-query-on-exit-flag proc nil)
    (set (make-local-variable 'flymake-syntax-check-process) proc)
    (setq flymake-check-was-interrupted t)
    (setq flymake-is-running nil)))

(advice-add 'flymake-start-syntax-check :around #'interrupting-flymake-start-syntax-check)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant