]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix Eglot's command generation for code actions
authorJoão Távora <joaotavora@gmail.com>
Thu, 16 Mar 2023 10:45:25 +0000 (10:45 +0000)
committerJoão Távora <joaotavora@gmail.com>
Thu, 16 Mar 2023 11:39:12 +0000 (11:39 +0000)
The user command generated by eglot--code-action should always call
eglot-code-actions with a INTERACTIVE set to t.

Reported in https://github.com/joaotavora/eglot/issues/1132.

* lisp/progmodes/eglot.el (eglot--code-action): Pass INTERACTIVE=t to
eglot-code-action call.

lisp/progmodes/eglot.el

index 4448c4a01fc8baf18515407cf46dcbc4f219580e..5c61a444fd3bd09f21242a555da3c830c364a813 100644 (file)
@@ -3371,7 +3371,7 @@ at point.  With prefix argument, prompt for ACTION-KIND."
   `(defun ,name (beg &optional end)
      ,(format "Execute `%s' code actions between BEG and END." kind)
      (interactive (eglot--region-bounds))
-     (eglot-code-actions beg end ,kind)))
+     (eglot-code-actions beg end ,kind t)))
 
 (eglot--code-action eglot-code-action-organize-imports "source.organizeImports")
 (eglot--code-action eglot-code-action-extract "refactor.extract")