Skip to content

Commit 1767902

Browse files
nbfalconyyoncho
authored andcommitted
Restore `lsp-execute-command' as an obsolete defun
Its original function, being a `cl-defgeneric' that can be overriden per language server is gone; however, PRs were provided to eliminate all uses of it in that context. To remain backwards-compatible, it will still remain as an obsolete `defun' that calls `lsp--execute-command' internally.
1 parent dd4d5b7 commit 1767902

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lsp-mode.el

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5209,6 +5209,16 @@ It will filter by KIND if non nil."
52095209
(funcall action-handler action)
52105210
(lsp--send-execute-command command arguments?)))
52115211

5212+
(defun lsp-execute-command (_ command arguments)
5213+
"Execute code action COMMAND with ARGUMENTS?.
5214+
Note that this function can now longer be overloaded using
5215+
`cl-defmethod', because that proved to be a liability. Use the
5216+
:action-handlers argument of `make-lsp-client' instead."
5217+
(lsp--execute-command
5218+
(lsp-make-command :command (symbol-name command)
5219+
:arguments? arguments)))
5220+
(make-obsolete #'lsp-execute-command #'lsp--execute-command "7.1.0")
5221+
52125222
(lsp-defun lsp-execute-code-action ((action &as &CodeAction :command? :edit?))
52135223
"Execute code action ACTION.
52145224
If ACTION is not set it will be selected from `lsp-code-actions-at-point'.

0 commit comments

Comments
 (0)