[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0bd58dd2d60: xref-find-references-and-replace: Use identifier-at-
From: |
Dmitry Gutov |
Subject: |
master 0bd58dd2d60: xref-find-references-and-replace: Use identifier-at-point in prompt |
Date: |
Fri, 11 Aug 2023 20:39:46 -0400 (EDT) |
branch: master
commit 0bd58dd2d605d5237483960c283e9e24706894e4
Author: Dmitry Gutov <dmitry@gutov.dev>
Commit: Dmitry Gutov <dmitry@gutov.dev>
xref-find-references-and-replace: Use identifier-at-point in prompt
* lisp/progmodes/xref.el (xref-find-references-and-replace):
Use identifier-at-point in prompt as defined by backend (bug#63939).
---
lisp/progmodes/xref.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index 643eea1b0a3..3f75f8d7132 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -1613,7 +1613,8 @@ is nil, prompt only if there's no usable symbol at point."
(defun xref-find-references-and-replace (from to)
"Replace all references to identifier FROM with TO."
(interactive
- (let* ((query-replace-read-from-default 'find-tag-default)
+ (let* ((query-replace-read-from-default
+ (lambda () (xref-backend-identifier-at-point (xref-find-backend))))
(common
(query-replace-read-args "Query replace identifier" nil)))
(list (nth 0 common) (nth 1 common))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0bd58dd2d60: xref-find-references-and-replace: Use identifier-at-point in prompt,
Dmitry Gutov <=