Not 100% sure on how to trigger this error, but it happened once or
twice, possibly during heavy debugging scenarios that wouldn't really
happen. But a good idea anyway.
* lisp/progmodes/flymake.el (flymake-on-timer-event): Check flymake-mode
"Start a syntax check for buffer BUFFER if necessary."
(when (buffer-live-p buffer)
(with-current-buffer buffer
- (when (and (not flymake-is-running)
+ (when (and flymake-mode
+ (not flymake-is-running)
flymake-last-change-time
(> (- (float-time) flymake-last-change-time)
flymake-no-changes-timeout))