From b3f31e0b657706baed13eeee2b6ae3eb1bd04049 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Fri, 26 Feb 2021 18:49:59 +0000 Subject: [PATCH] Handle empty actions array in window/showmessagerequest * eglot.el (eglot-handle-request window/showMessageRequest): Handle empty actions. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/627 --- lisp/progmodes/eglot.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 851f2e68ef9..98a1059e157 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -1572,7 +1572,8 @@ COMMAND is a symbol naming the command." (cl-defmethod eglot-handle-request (_server (_method (eql window/showMessageRequest)) &key type message actions) "Handle server request window/showMessageRequest" - (let ((label (completing-read + (let ((actions (append actions nil)) ;; gh#627 + (label (completing-read (concat (format (propertize "[eglot] Server reports (type=%s): %s" 'face (if (<= type 1) 'error)) -- 2.39.2