[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/elpa 8e6488f 023/139: Don't switch to possibly dead buf
From: |
João Távora |
Subject: |
[elpa] externals/elpa 8e6488f 023/139: Don't switch to possibly dead buffer in sentinel |
Date: |
Mon, 14 May 2018 09:53:27 -0400 (EDT) |
branch: externals/elpa
commit 8e6488f2dbdb55708fb2743aa9e86d583b8f9148
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Don't switch to possibly dead buffer in sentinel
* eglot.el (eglot--process-sentinel): Don't with-current-buffer.
---
eglot.el | 44 ++++++++++++++++++++++----------------------
1 file changed, 22 insertions(+), 22 deletions(-)
diff --git a/eglot.el b/eglot.el
index 44023b7..22ff031 100644
--- a/eglot.el
+++ b/eglot.el
@@ -153,24 +153,23 @@ INTERACTIVE is t if called interactively."
(eglot--protocol-initialize proc interactive)))))))
(defun eglot--process-sentinel (process change)
- (with-current-buffer (process-buffer process)
- (eglot--debug "(sentinel) Process state changed to %s" change)
- (when (not (process-live-p process))
- ;; Remember to cancel all timers
- ;;
- (maphash (lambda (id quad)
- (cl-destructuring-bind (_success _error timeout _env) quad
- (eglot--message
- "(sentinel) Cancelling timer for continuation %s" id)
- (cancel-timer timeout)))
- (eglot--pending-continuations process))
- (cond ((eglot--moribund process)
- (eglot--message "(sentinel) Moribund process exited with status
%s"
- (process-exit-status process)))
- (t
- (eglot--warn "(sentinel) Process unexpectedly changed to %s"
- change)))
- (delete-process process))))
+ (eglot--debug "(sentinel) Process state changed to %s" change)
+ (when (not (process-live-p process))
+ ;; Remember to cancel all timers
+ ;;
+ (maphash (lambda (id quad)
+ (cl-destructuring-bind (_success _error timeout _env) quad
+ (eglot--message
+ "(sentinel) Cancelling timer for continuation %s" id)
+ (cancel-timer timeout)))
+ (eglot--pending-continuations process))
+ (cond ((eglot--moribund process)
+ (eglot--message "(sentinel) Moribund process exited with status %s"
+ (process-exit-status process)))
+ (t
+ (eglot--warn "(sentinel) Process unexpectedly changed to %s"
+ change)))
+ (delete-process process)))
(defun eglot--process-filter (proc string)
"Called when new data STRING has arrived for PROC."
@@ -371,7 +370,8 @@ identifier. ERROR is non-nil if this is an error."
(error-fn
(or error-fn
(cl-function
- (lambda (&key code message)
+ (lambda (&key data code message &allow-other-keys)
+ (setf (eglot--status process) '("error" t))
(eglot--warn
"(request) Request id=%s errored with code=%s: %s"
id code message)))))
@@ -446,9 +446,9 @@ INTERACTIVE is t if caller was called interactively."
process
:initialize
`(:processId ,(emacs-pid)
- :rootPath ,(concat "file://"
- (expand-file-name (car (project-roots
-
(project-current)))))
+ :rootPath ,(concat
+ (expand-file-name (car (project-roots
+ (project-current)))))
:initializationOptions []
:capabilities (:workspace (:executeCommand
(:dynamicRegistration t))
:textDocument (:synchronization
(:didSave t))))
- [elpa] externals/elpa 88e3655 040/139: Appease checkdoc.el, (continued)
- [elpa] externals/elpa 88e3655 040/139: Appease checkdoc.el, João Távora, 2018/05/14
- [elpa] externals/elpa f7f77e1 044/139: Make M-x eglot the main entry point, João Távora, 2018/05/14
- [elpa] externals/elpa 51ff863 046/139: Must re-announce didOpen after reconnect, João Távora, 2018/05/14
- [elpa] externals/elpa d2eca65 045/139: Fix another Flymake sync bug, João Távora, 2018/05/14
- [elpa] externals/elpa c95a0a4 041/139: Multiple servers per project are possible, João Távora, 2018/05/14
- [elpa] externals/elpa e60c7fc 013/139: Overhaul async mechanism safety, João Távora, 2018/05/14
- [elpa] externals/elpa a3545fb 050/139: Rename RPC methods for clarity, João Távora, 2018/05/14
- [elpa] externals/elpa 4d4b85d 061/139: eglot-editing-mode becomes eglot--managed-mode, João Távora, 2018/05/14
- [elpa] externals/elpa 4f246b5 017/139: * eglot.el (eglot-mode-map): Move up before minor mode., João Távora, 2018/05/14
- [elpa] externals/elpa a4f99e0 005/139: Introduce and use `eglot--current-process-or-lose', João Távora, 2018/05/14
- [elpa] externals/elpa 8e6488f 023/139: Don't switch to possibly dead buffer in sentinel,
João Távora <=
- [elpa] externals/elpa be52e1e 037/139: Rework connection restarting again, João Távora, 2018/05/14
- [elpa] externals/elpa cc183a6 043/139: Fix assorted bugs, João Távora, 2018/05/14
- [elpa] externals/elpa e8f859e 031/139: Rework commands for connecting and reconnecting, João Távora, 2018/05/14
- [elpa] externals/elpa b511b7d 036/139: Redesign and simplify parser, João Távora, 2018/05/14
- [elpa] externals/elpa b4dd4f8 022/139: Report server status in the mode-line, João Távora, 2018/05/14
- [elpa] externals/elpa 46bb1c0 049/139: Reorganize file, João Távora, 2018/05/14
- [elpa] externals/elpa b69302c 060/139: Make M-x eglot's interactive spec a separate function, João Távora, 2018/05/14
- [elpa] externals/elpa b657b32 068/139: Use rootUri instead of rootPath, João Távora, 2018/05/14
- [elpa] externals/elpa eebd32b 059/139: When user declines to reconnect, first quit existing server, João Távora, 2018/05/14
- [elpa] externals/elpa f1b6485 053/139: Trim some edges and add a bunch of boring RPC methods, João Távora, 2018/05/14