]> git.eshelyaron.com Git - emacs.git/commitdiff
Remove Eglot activation check from find-file-hook
authorJoão Távora <joaotavora@gmail.com>
Sat, 4 Mar 2023 00:09:32 +0000 (00:09 +0000)
committerJoão Távora <joaotavora@gmail.com>
Sat, 4 Mar 2023 00:16:41 +0000 (00:16 +0000)
Adding eglot--maybe-activate-editing-mode to find-file-hook isn't
really necessary, since it is already in
'after-change-major-mode-hook', and that also runs every time we find
a file.

This reduces the number of project.el logic that runs every time the
user visits a file.

* lisp/progmodes/eglot.el (find-file-hook): No need to add
eglot--maybe-activate-editing-mode here.

lisp/progmodes/eglot.el

index a11ec0e4bbdd21a118205ffd5a5f79f9df8dc713..c74b13d33803511574d8e869d10ae761ff130b71 100644 (file)
@@ -1924,7 +1924,6 @@ If it is activated, also signal textDocument/didOpen."
       ;; about the buffer.
       (run-hooks 'eglot-managed-mode-hook))))
 
-(add-hook 'find-file-hook 'eglot--maybe-activate-editing-mode)
 (add-hook 'after-change-major-mode-hook 'eglot--maybe-activate-editing-mode)
 
 (defun eglot-clear-status (server)