branch: externals/eglot commit 458bc6989e33ab0b95b6f1c8d2aa90e0a06c468d Author: João Távora <joaotav...@gmail.com> Commit: João Távora <joaotav...@gmail.com>
More correctly setup rust-mode-related autoloads By autoloading the add-hook form and the eglot--setup-rls-idiosyncrasies definition, a user can start rust-mode without loading eglot.el along with it. * eglot.el (rust-mode-hook) (eglot--setup-rls-idiosyncrasies): Wrap in autoloaded progn. --- eglot.el | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/eglot.el b/eglot.el index eba0e84..fbddf16 100644 --- a/eglot.el +++ b/eglot.el @@ -1471,12 +1471,11 @@ Proceed? " (and (equal "Indexing" what) done)))) ;;;###autoload -(add-hook 'rust-mode-hook 'eglot--setup-rls-idiosyncrasies) - -;;;###autoload -(defun eglot--setup-rls-idiosyncrasies () - "RLS needs special treatment..." - (add-hook 'eglot--ready-predicates 'eglot--rls-probably-ready-for-p t t)) +(progn + (add-hook 'rust-mode-hook 'eglot--setup-rls-idiosyncrasies) + (defun eglot--setup-rls-idiosyncrasies () + "Prepare `eglot' to deal with RLS's special treatment." + (add-hook 'eglot--ready-predicates 'eglot--rls-probably-ready-for-p t t))) (cl-defun eglot--server-window/progress (process &key id done title message &allow-other-keys)