From: João Távora Date: Mon, 7 May 2018 21:15:21 +0000 (+0100) Subject: Get rid of eglot--special-buffer-process X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~619 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=44cdd8062bd1d40caa76e91964a49e7acf3ae56c;p=emacs.git 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. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index ba3b5bee71e..1318feee511 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/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))