]> git.eshelyaron.com Git - emacs.git/commitdiff
Protect against timer triggers when no flymake-mode
authorJoão Távora <joaotavora@gmail.com>
Wed, 20 Sep 2017 18:10:30 +0000 (19:10 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 2 Oct 2017 23:53:11 +0000 (00:53 +0100)
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

lisp/progmodes/flymake.el

index e8d5de6023cb12f792a7714519160bc11c2459f3..7968070b34a358d5cfcb3fbd5ac88954ecc8c980 100644 (file)
@@ -361,7 +361,8 @@ return DEFAULT."
   "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))