[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 8e6488f 023/139: Don't switch to possibly dead bu
From: |
João Távora |
Subject: |
[elpa] externals/eglot 8e6488f 023/139: Don't switch to possibly dead buffer in sentinel |
Date: |
Mon, 14 May 2018 09:54:44 -0400 (EDT) |
branch: externals/eglot
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/eglot 0ec7801 012/139: Simplify `eglot--protocol-initialize`, (continued)
- [elpa] externals/eglot 0ec7801 012/139: Simplify `eglot--protocol-initialize`, João Távora, 2018/05/14
- [elpa] externals/eglot 4f246b5 017/139: * eglot.el (eglot-mode-map): Move up before minor mode., João Távora, 2018/05/14
- [elpa] externals/eglot bc011d0 010/139: Minor cleanup, João Távora, 2018/05/14
- [elpa] externals/eglot e60c7fc 013/139: Overhaul async mechanism safety, João Távora, 2018/05/14
- [elpa] externals/eglot a4f99e0 005/139: Introduce and use `eglot--current-process-or-lose', João Távora, 2018/05/14
- [elpa] externals/eglot efd14d6 015/139: Fix mode line, João Távora, 2018/05/14
- [elpa] externals/eglot 63f2208 030/139: Less obstrusive flymake stuff for now, João Távora, 2018/05/14
- [elpa] externals/eglot 8bd634c 016/139: Start working on this again, João Távora, 2018/05/14
- [elpa] externals/eglot 3403f86 027/139: Correctly report what we currently are capable of, João Távora, 2018/05/14
- [elpa] externals/eglot 7c82a03 024/139: Start experimenting with python, João Távora, 2018/05/14
- [elpa] externals/eglot 8e6488f 023/139: Don't switch to possibly dead buffer in sentinel,
João Távora <=
- [elpa] externals/eglot e1d36d2 014/139: Fix some byte-compilation warnings, João Távora, 2018/05/14
- [elpa] externals/eglot 6f6f01d 018/139: Doc fixes, João Távora, 2018/05/14
- [elpa] externals/eglot 7ec0dcf 029/139: Events buffer uses eglot-mode, source buffers use eglot-editing-mode, João Távora, 2018/05/14
- [elpa] externals/eglot 22dc2f7 034/139: Ready to start fixing flymake integration, João Távora, 2018/05/14
- [elpa] externals/eglot e8f859e 031/139: Rework commands for connecting and reconnecting, João Távora, 2018/05/14
- [elpa] externals/eglot 92bf3a0 038/139: Signal textDocument/didClose, João Távora, 2018/05/14
- [elpa] externals/eglot b511b7d 036/139: Redesign and simplify parser, João Távora, 2018/05/14
- [elpa] externals/eglot 328c7ae 025/139: Auto update mode-line after setting some process properties, João Távora, 2018/05/14
- [elpa] externals/eglot 2b61a3b 048/139: Delete two useless forward declarations, João Távora, 2018/05/14
- [elpa] externals/eglot 88e3655 040/139: Appease checkdoc.el, João Távora, 2018/05/14