From f97e9aa75c794f11442167c239439244c88d343f Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Tue, 12 May 2020 11:50:56 -0400 Subject: [PATCH] Don't call flymake report function if flymake is disabled Also fix https://github.com/joaotavora/eglot/issues/472. Copyright-paperwork-exempt: yes * eglot.el (eglot-handle-notification): Check that flymake-mode is active before calling flymake report function. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/468 --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 8dae0b70263..112959b3564 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1580,7 +1580,7 @@ COMMAND is a symbol naming the command." (t 'eglot-note)) message `((eglot-lsp-diag . ,diag-spec))))) into diags - finally (cond (eglot--current-flymake-report-fn + finally (cond ((and flymake-mode eglot--current-flymake-report-fn) (funcall eglot--current-flymake-report-fn diags ;; If the buffer hasn't changed since last ;; call to the report function, flymake won't -- 2.39.2