From: João Távora Date: Mon, 7 May 2018 16:27:01 +0000 (+0100) Subject: Explain why didopen on after-revert-hook is a bad idea X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~625 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=711d3a1d33d693eca9a1e21157518e1198b0ca9c;p=emacs.git 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. --- 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)