]> git.eshelyaron.com Git - emacs.git/commit
Be lazy when starting Flymake checks
authorJoão Távora <joaotavora@gmail.com>
Mon, 9 Oct 2017 10:12:57 +0000 (11:12 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 9 Oct 2017 10:12:57 +0000 (11:12 +0100)
commit11b37b4a9f3a032f307ff644ed76b31c3133f718
treeee6512e8668ab0455d2c47da68432530a7464e93
parent36ed9a9ede7057dbd30492ae88aab3b5b8c8f23a
Be lazy when starting Flymake checks

Don't start the check immediately if the buffer is not being
displayed.  Wait until it is, using window-configuration-change-hook.

This enables the user to batch-enable flymake-mode on many buffers and
not have that operation exhaust system resources for checking each
one.  Likewise, an editing or save operation in a currently
non-displayed buffer does not immediately start a check.

* lisp/progmodes/flymake.el (flymake-start-on-flymake-mode):
Rename from flymake-start-syntax-check-on-find-file.
(flymake-start-syntax-check-on-find-file): Obsolete alias for
flymake-start-on-flymake-mode.
(flymake-start): Redesign.  Affect the global post-command-hook
and local window-configuraiton-change-hook.
(flymake--schedule-timer-maybe)
(flymake-after-change-function, flymake-after-save-hook): Pass
t to flymake-start.

* test/lisp/progmodes/flymake-tests.el (flymake-tests--call-with-fixture)
(dummy-backends, recurrent-backend): Start flymake check
explicitly and immediately.
lisp/progmodes/flymake.el
test/lisp/progmodes/flymake-tests.el