Skip to content

Commit 7dd2d9d

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 7262cd4 commit 7dd2d9d

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

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

0 commit comments

Comments
 (0)