From: João Távora Date: Wed, 22 Mar 2023 10:16:17 +0000 (+0000) Subject: Eglot: more leniently handle 'window/showMessageRequest' X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f20fe3e11a96defe69e7cfed801a047be1778b51;p=emacs.git Eglot: more leniently handle 'window/showMessageRequest' Some servers mess up this message's arguments. * lisp/progmodes/eglot.el (eglot-handle-request): Fix. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 058bcec1489..9fd12d174da 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2136,13 +2136,14 @@ COMMAND is a symbol naming the command." type message)) (cl-defmethod eglot-handle-request - (_server (_method (eql window/showMessageRequest)) &key type message actions) + (_server (_method (eql window/showMessageRequest)) + &key type message actions &allow-other-keys) "Handle server request window/showMessageRequest." (let* ((actions (append actions nil)) ;; gh#627 (label (completing-read (concat (format (propertize "[eglot] Server reports (type=%s): %s" - 'face (if (<= type 1) 'error)) + 'face (if (or (not type) (<= type 1)) 'error)) type message) "\nChoose an option: ") (or (mapcar (lambda (obj) (plist-get obj :title)) actions)