]> git.eshelyaron.com Git - emacs.git/commitdiff
eglot.el: Cease overriding 'flymake-diagnostic-functions'
authorEshel Yaron <me@eshelyaron.com>
Thu, 8 Aug 2024 11:20:49 +0000 (13:20 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 8 Aug 2024 11:20:49 +0000 (13:20 +0200)
lisp/progmodes/eglot.el

index 9c55402cc05bdb31b4cd190cc67fa0c30f2f6aa2..b57cfe260e12c7213286e95db3e588bc190eee0c 100644 (file)
@@ -2032,7 +2032,6 @@ Use `eglot-managed-p' to determine if current buffer is managed.")
     (add-hook 'post-self-insert-hook #'eglot--post-self-insert-hook nil t)
     (add-hook 'pre-command-hook #'eglot--pre-command-hook nil t)
     (eglot--setq-saving xref-prompt-for-identifier nil)
-    (eglot--setq-saving flymake-diagnostic-functions '(eglot-flymake-backend))
     (eglot--setq-saving company-backends '(company-capf))
     (eglot--setq-saving company-tooltip-align-annotations t)
     (eglot--setq-saving eldoc-documentation-strategy
@@ -2041,6 +2040,7 @@ Use `eglot-managed-p' to determine if current buffer is managed.")
       (add-function :before-until (local 'imenu-create-index-function)
                     #'eglot-imenu))
     (unless (eglot--stay-out-of-p 'flymake)
+      (add-hook 'flymake-diagnostic-functions #'eglot-flymake-backend nil t)
       (if flymake-mode (flymake-start) (flymake-mode 1)))
     (unless (eglot--stay-out-of-p 'eldoc)
       (add-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function
@@ -2065,6 +2065,7 @@ Use `eglot-managed-p' to determine if current buffer is managed.")
     (remove-hook 'pre-command-hook #'eglot--pre-command-hook t)
     (remove-hook 'eldoc-documentation-functions #'eglot-hover-eldoc-function t)
     (remove-hook 'eldoc-documentation-functions #'eglot-signature-eldoc-function t)
+    (remove-hook 'flymake-diagnostic-functions #'eglot-flymake-backend t)
     (cl-loop for (var . saved-binding) in eglot--saved-bindings
              do (set (make-local-variable var) saved-binding))
     (remove-function (local 'imenu-create-index-function) #'eglot-imenu)