]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't call flymake report function if flymake is disabled
authorDan Davison <dandavison7@gmail.com>
Tue, 12 May 2020 15:50:56 +0000 (11:50 -0400)
committerGitHub <noreply@github.com>
Tue, 12 May 2020 15:50:56 +0000 (16:50 +0100)
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

index 8dae0b70263f4eb7c6d363763a7176bd1afa1c58..112959b356442e2266c8a32de31c7c200789b2ec 100644 (file)
@@ -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