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

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

[elpa] externals/eglot 7184df3 2/5: * eglot.el (eglot-shutdown): Accept


From: João Távora
Subject: [elpa] externals/eglot 7184df3 2/5: * eglot.el (eglot-shutdown): Accept TIMEOUT param.
Date: Wed, 13 Jun 2018 13:49:10 -0400 (EDT)

branch: externals/eglot
commit 7184df3d5651b83d0462298b3cc4208023f58818
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    * eglot.el (eglot-shutdown): Accept TIMEOUT param.
---
 eglot.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eglot.el b/eglot.el
index d9fbd33..e438c49 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1039,14 +1039,14 @@ Uses THING, FACE, DEFS and PREPEND."
 
 ;;; Protocol implementation (Requests, notifications, etc)
 ;;;
-(defun eglot-shutdown (server &optional _interactive)
+(defun eglot-shutdown (server &optional _interactive timeout)
   "Politely ask SERVER to quit.
-Forcefully quit it if it doesn't respond.  Don't leave this
-function with the server still running."
+Forcefully quit it if it doesn't respond within TIMEOUT seconds.
+Don't leave this function with the server still running."
   (interactive (list (eglot--current-server-or-lose) t))
   (eglot--message "Asking %s politely to terminate" (eglot--name server))
   (unwind-protect
-      (let ((eglot-request-timeout 3))
+      (let ((eglot-request-timeout (or timeout 1.5)))
         (setf (eglot--shutdown-requested server) t)
         (eglot--request server :shutdown nil)
         ;; this one is supposed to always fail, hence ignore-errors



reply via email to

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