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

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

[elpa] externals/elpa fceb6bb 090/139: Get rid of eglot--special-buffer-


From: João Távora
Subject: [elpa] externals/elpa fceb6bb 090/139: Get rid of eglot--special-buffer-process
Date: Mon, 14 May 2018 09:53:42 -0400 (EDT)

branch: externals/elpa
commit fceb6bb5dd740101033d61c5a094bdd1f8b89957
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Get rid of eglot--special-buffer-process
    
    Hasn't really proved useful yet.
    
    * eglot.el (eglot--special-buffer-process): Delete.
    (eglot--current-process): Simplify.
    (eglot--events-buffer): Simplify.
---
 eglot.el | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/eglot.el b/eglot.el
index ba3b5be..1318fee 100644
--- a/eglot.el
+++ b/eglot.el
@@ -61,19 +61,11 @@
 (defvar eglot--processes-by-project (make-hash-table :test #'equal)
   "Keys are projects.  Values are lists of processes.")
 
-(defvar-local eglot--special-buffer-process nil
-  "Current buffer's eglot process.")
-
 (defun eglot--current-process ()
   "The current logical EGLOT process."
-  (or eglot--special-buffer-process
-      (let* ((cur (project-current))
-             (processes
-              (and cur
-                   (gethash cur eglot--processes-by-project))))
-        (cl-find major-mode
-                 processes
-                 :key #'eglot--major-mode))))
+  (let* ((cur (project-current))
+         (processes (and cur (gethash cur eglot--processes-by-project))))
+    (cl-find major-mode processes :key #'eglot--major-mode)))
 
 (defun eglot--current-process-or-lose ()
   "Return the current EGLOT process or error."
@@ -465,9 +457,7 @@ INTERACTIVE is t if called interactively."
                        (with-current-buffer buffer
                          (buffer-disable-undo)
                          (read-only-mode t)
-                         (setf (eglot--events-buffer process) buffer
-                               eglot--special-buffer-process process)
-                         (eglot-mode))
+                         (setf (eglot--events-buffer process) buffer))
                        buffer))))
     (when interactive (display-buffer buffer))
     buffer))



reply via email to

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