replacing matches for @var{regexp} with the string
@var{to} (@code{dired-do-find-regexp-and-replace}).
-This command is a variant of @code{xref-query-replace}. It presents
-an @file{*xref*} buffer that lists all the matches of @var{regexp},
+This command is a variant of @code{xref-query-replace-in-results}. It
+presents an @file{*xref*} buffer that lists all the matches of @var{regexp},
and you can use the special commands in that buffer (@pxref{Xref
Commands}). In particular, if you exit the query replace loop, you
can use @kbd{r} in that buffer to replace more matches.
@findex xref-show-location-at-point
Display the reference on the current line in the other window
(@code{xref-show-location-at-point}).
-@findex xref-query-replace
+@findex xref-query-replace-in-results
@item r @var{pattern} @key{RET} @var{replacement} @key{RET}
Perform interactive query-replace on references that match
-@var{pattern} (@code{xref-query-replace}), replacing the match with
-@var{replacement}. @xref{Identifier Search}.
+@var{pattern} (@code{xref-query-replace-in-results}), replacing
+the match with @var{replacement}. @xref{Identifier Search}.
@findex xref-quit
@item q
Quit the window showing the @file{*xref*} buffer (@code{xref-quit}).
@table @kbd
@item M-?
Find all the references for the identifier at point.
-@item M-x xref-query-replace @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET}
+@item M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET}
Interactively replace @var{regexp} with @var{replacement} in the names
of all the identifiers shown in the @file{*xref*} buffer.
@item M-x tags-search @key{RET} @var{regexp} @key{RET}
referenced. The XREF mode commands are available in this buffer, see
@ref{Xref Commands}.
-@findex xref-query-replace
- @kbd{M-x xref-query-replace} reads a regexp to match identifier
+@findex xref-query-replace-in-results
+ @kbd{M-x xref-query-replace-in-results} reads a regexp to match identifier
names and a replacement string, just like ordinary @kbd{M-x
query-replace-regexp}. It then performs the specified replacement in
the names of the matching identifiers in all the places in all the
+++
*** New user interface for the `A' and `Q' commands.
These keys, now bound to `dired-do-find-regexp' and
-`dired-do-find-regexp-and-replace', work similarly to
-`xref-find-apropos' and `xref-query-replace': they present the matches
+`dired-do-find-regexp-and-replace', work similarly to `xref-find-apropos'
+and `xref-query-replace-in-results': they present the matches
in the `*xref*' buffer and let you move through the matches. No need
to use `tags-loop-continue' to resume the search or replace loop. The
previous commands, `dired-do-search' and
'(dired-get-marked-files nil nil 'dired-nondirectory-p)))
(declare-function xref--show-xrefs "xref")
-(declare-function xref-query-replace "xref")
+(declare-function xref-query-replace-in-results "xref")
;;;###autoload
(defun dired-do-find-regexp (regexp)
"Query replace regexp in marked files" t t)))
(list (nth 0 common) (nth 1 common))))
(with-current-buffer (dired-do-find-regexp from)
- (xref-query-replace from to)))
+ (xref-query-replace-in-results from to)))
(defun dired-nondirectory-p (file)
(not (file-directory-p file)))
(xref-quit)
(xref--pop-to-location xref window)))
-(defun xref-query-replace (from to)
+(defun xref-query-replace-in-results (from to)
"Perform interactive replacement of FROM with TO in all displayed xrefs.
This command interactively replaces FROM with TO in the names of the
(define-key map [remap quit-window] #'xref-quit)
(define-key map (kbd "n") #'xref-next-line)
(define-key map (kbd "p") #'xref-prev-line)
- (define-key map (kbd "r") #'xref-query-replace)
+ (define-key map (kbd "r") #'xref-query-replace-in-results)
(define-key map (kbd "RET") #'xref-goto-xref)
(define-key map (kbd "C-o") #'xref-show-location-at-point)
;; suggested by Johan Claesson "to further reduce finger movement":