From: Michal Krzywkowski Date: Fri, 23 Nov 2018 18:00:00 +0000 (+0100) Subject: Codeaction command can be a command object () X-Git-Tag: emacs-29.0.90~1616^2~524^2~4^2~389 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e7f94d75a30628be56ad00de8c6245f5f3e9fdf;p=emacs.git Codeaction command can be a command object () * eglot.el (eglot-code-actions): Handle case when the :command field is not a string. GitHub-reference: fix https://github.com/joaotavora/eglot/issues/164 GitHub-reference: fix https://github.com/joaotavora/eglot/issues/165 --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 4996f5b639a..bc89cd28f37 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -2011,7 +2011,12 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp." (when edit (eglot--apply-workspace-edit edit)) (when command - (eglot-execute-command server (intern command) arguments))))) + (cond ((stringp command) + (eglot-execute-command server (intern command) arguments)) + ((listp command) + (eglot-execute-command server + (intern (plist-get command :command)) + (plist-get command :arguments))))))))