1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Eglot: use symbol at point as default in eglot-rename (bug#79757)

* lisp/progmodes/eglot.el (eglot-rename): Tweak.

Copyright-paperwork-exempt: yes
This commit is contained in:
Anatolii Smolianinov 2025-11-18 20:52:30 +00:00 committed by João Távora
parent 6b0cf8ab87
commit 6b389a61c1

View file

@ -4075,12 +4075,10 @@ edit proposed by the server."
(defun eglot-rename (newname)
"Rename the current symbol to NEWNAME."
(interactive
(let ((tap (thing-at-point 'symbol t)))
(list (read-from-minibuffer
(eglot--format "Rename `%s' to: "
(or (thing-at-point 'symbol t)
"unknown symbol"))
nil nil nil nil
(symbol-name (symbol-at-point)))))
(format "Rename `%s' to: " (or tap "unknown symbol"))
tap nil nil nil tap))))
(eglot-server-capable-or-lose :renameProvider)
(eglot--apply-workspace-edit
(eglot--request (eglot--current-server-or-lose)