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.