From 555bea3615c2fb032c2b24ff6252e4322e9192d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Wed, 20 Sep 2017 19:10:30 +0100 Subject: [PATCH] Protect against timer triggers when no flymake-mode 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index e8d5de6023c..7968070b34a 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -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)) -- 2.39.5