]> git.eshelyaron.com Git - emacs.git/commitdiff
Provide suitable default to m-x eglot-rename
authorPaul M. Rodriguez <paulmrodriguez@gmail.com>
Fri, 21 Aug 2020 22:27:40 +0000 (17:27 -0500)
committerGitHub <noreply@github.com>
Fri, 21 Aug 2020 22:27:40 +0000 (23:27 +0100)
Copyright-paperwork-exempt: Yes

* eglot (eglot-rename): Provide a default value.

GitHub-reference: fix https://github.com/joaotavora/eglot/issues/524

lisp/progmodes/eglot.el

index a4ba1f9f93412697933cce60ff134c26f274423d..64543d7bb873d3a235a6277db693ceb4dc507b2c 100644 (file)
@@ -2477,7 +2477,9 @@ is not active."
 (defun eglot-rename (newname)
   "Rename the current symbol to NEWNAME."
   (interactive
-   (list (read-from-minibuffer (format "Rename `%s' to: " (symbol-at-point)))))
+   (list (read-from-minibuffer (format "Rename `%s' to: " (symbol-at-point))
+                               nil nil nil nil
+                               (symbol-name (symbol-at-point)))))
   (unless (eglot--server-capable :renameProvider)
     (eglot--error "Server can't rename!"))
   (eglot--apply-workspace-edit