branch: externals/eglot
commit f7f77e19871dbfd6effda076e0557b90e34d2db2
Author: João Távora <joaotav...@gmail.com>
Commit: João Távora <joaotav...@gmail.com>

    Make M-x eglot the main entry point
    
    * eglot.el (eglot-new-process): Removed
    (eglot): Rename from eglot-new-process.
    (eglot-editing-mode): Mention M-x eglot
    
    * README.md: Use M-x eglot
---
 README.md | 2 +-
 eglot.el  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 7cf96f9..7a747fd 100644
--- a/README.md
+++ b/README.md
@@ -9,5 +9,5 @@ Coming soon.
 (add-to-list 'load-path "/path/to/eglot")
 (require 'eglot)
 
-M-x eglot-new-process
+M-x eglot
 ```
diff --git a/eglot.el b/eglot.el
index 5c014f3..ccf4b72 100644
--- a/eglot.el
+++ b/eglot.el
@@ -208,9 +208,9 @@ INTERACTIVE is t if called interactively."
      (eglot--message "Reconnected!"))))
 
 (defvar eglot--command-history nil
-  "History of COMMAND arguments to `eglot-new-process'.")
+  "History of COMMAND arguments to `eglot'.")
 
-(defun eglot-new-process (managed-major-mode command &optional interactive)
+(defun eglot (managed-major-mode command &optional interactive)
   ;; FIXME: Later make this function also connect to TCP servers by
   ;; overloading semantics on COMMAND.
   "Start a Language Server Protocol server.
@@ -252,7 +252,7 @@ INTERACTIVE is t if called interactively."
   (let* ((project (project-current))
          (short-name (eglot--project-short-name project)))
     (unless project (eglot--error
-                     "(new-process) Cannot work without a current project!"))
+                     "Cannot work without a current project!"))
     (let ((current-process (eglot--current-process))
           (command
            (or command
@@ -742,7 +742,7 @@ that case, also signal textDocument/didOpen."
     (flymake-mode 1)
     (if (eglot--current-process)
         (eglot--signalDidOpen)
-      (eglot--warn "No process, start one with `M-x eglot-new-process'")))
+      (eglot--warn "No process, start one with `M-x eglot'")))
    (t
     (remove-hook 'flymake-diagnostic-functions 'eglot-flymake-backend t)
     (remove-hook 'after-change-functions 'eglot--after-change t)

Reply via email to