emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 182241a074 1/3: Close #385: change from symbol-at


From: ELPA Syncer
Subject: [elpa] externals/eglot 182241a074 1/3: Close #385: change from symbol-at-point to thing-at-point
Date: Thu, 13 Jan 2022 16:57:30 -0500 (EST)

branch: externals/eglot
commit 182241a074411265425d51573efc9ccec492116a
Author: Theodor Thornhill <theodorthornhill@icloud.com>
Commit: Stefan Kangas <stefan@marxist.se>

    Close #385: change from symbol-at-point to thing-at-point
    
    * eglot.el (eglot-rename): Change from symbol-at-point to
    thing-at-point to avoid interning a symbol.  Add "unknown symbol" to
    prompt when no symbol is found.
    
    Co-authored-by: João Távora <joaotavora@gmail.com>
---
 eglot.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/eglot.el b/eglot.el
index dc20ef751b..4e92bf09bf 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2774,9 +2774,11 @@ 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))
-                               nil nil nil nil
-                               (symbol-name (symbol-at-point)))))
+   (list (read-from-minibuffer
+          (format "Rename `%s' to: " (or (thing-at-point 'symbol t)
+                                         "unknown symbol"))
+          nil nil nil nil
+          (symbol-name (symbol-at-point)))))
   (unless (eglot--server-capable :renameProvider)
     (eglot--error "Server can't rename!"))
   (eglot--apply-workspace-edit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]