Skip to content

Commit 2f4a74d

Browse files
committed
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 f7cc002 commit 2f4a74d

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
@@ -5169,6 +5169,16 @@ It will show up only if current point has signature help."
51695169
(funcall action-handler action)
51705170
(lsp--send-execute-command command arguments?)))
51715171

5172+
(defun lsp-execute-command (_ command arguments)
5173+
"Execute code action COMMAND with ARGUMENTS?.
5174+
Note that this function can now longer be overloaded using
5175+
`cl-defmethod', because that proved to be a liability. Use the
5176+
:action-handlers argument of `make-lsp-client' instead."
5177+
(lsp--execute-command
5178+
(lsp-make-command :command (symbol-name command)
5179+
:arguments? arguments)))
5180+
(make-obsolete #'lsp-execute-command #'lsp--execute-command "7.1.0")
5181+
51725182
(lsp-defun lsp-execute-code-action ((action &as &CodeAction :command? :edit?))
51735183
"Execute code action ACTION.
51745184
If ACTION is not set it will be selected from `lsp-code-actions-at-point'."

0 commit comments

Comments
 (0)