emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 458bc69 110/139: More correctly setup rust-mode-r


From: João Távora
Subject: [elpa] externals/eglot 458bc69 110/139: More correctly setup rust-mode-related autoloads
Date: Mon, 14 May 2018 09:55:03 -0400 (EDT)

branch: externals/eglot
commit 458bc6989e33ab0b95b6f1c8d2aa90e0a06c468d
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]