From 711d3a1d33d693eca9a1e21157518e1198b0ca9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 7 May 2018 17:27:01 +0100 Subject: [PATCH] Explain why didopen on after-revert-hook is a bad idea The reason is that the global find-file-hook is called again, and that already does the didOpen. Too many didOpen's would be bad. * eglot.el (eglot--managed-mode): Remove commented lines. --- lisp/progmodes/eglot.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 2ab47819f02..068e2ca5c54 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -784,7 +784,6 @@ Meaning only return locally if successful, otherwise exit non-locally." (add-hook 'flymake-diagnostic-functions 'eglot-flymake-backend nil t) (add-hook 'kill-buffer-hook 'eglot--signal-textDocument/didClose nil t) (add-hook 'before-revert-hook 'eglot--signal-textDocument/didClose nil t) - ;;(add-hook 'after-revert-hook 'eglot--signal-textDocument/didOpen nil t) (add-hook 'before-save-hook 'eglot--signal-textDocument/willSave nil t) (add-hook 'after-save-hook 'eglot--signal-textDocument/didSave nil t) (add-hook 'xref-backend-functions 'eglot-xref-backend nil t) @@ -796,7 +795,6 @@ Meaning only return locally if successful, otherwise exit non-locally." (remove-hook 'before-change-functions 'eglot--before-change t) (remove-hook 'kill-buffer-hook 'eglot--signal-textDocument/didClose t) (remove-hook 'before-revert-hook 'eglot--signal-textDocument/didClose t) - ;; (remove-hook 'after-revert-hook 'eglot--signal-textDocument/didOpen t) (remove-hook 'before-save-hook 'eglot--signal-textDocument/willSave t) (remove-hook 'after-save-hook 'eglot--signal-textDocument/didSave t) (remove-hook 'xref-backend-functions 'eglot-xref-backend t) -- 2.39.2