From: Eli Zaretskii Date: Fri, 14 Jan 2022 08:01:39 +0000 (+0200) Subject: Update docs of 'xref-query-replace-in-results' X-Git-Tag: emacs-29.0.90~3072 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c953c40a909d5307810009def5f7b9f7570572b;p=emacs.git Update docs of 'xref-query-replace-in-results' * doc/emacs/maintaining.texi (Identifier Search): Update the documentation of 'xref-query-replace-in-results'. --- diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e508e87b8dc..9f5073674c4 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -2317,7 +2317,8 @@ them. @item M-? Find all the references for the identifier at point. -@item M-x xref-query-replace-in-results @key{RET} @var{regexp} @key{RET} @var{replacement} @key{RET} +@itemx M-x xref-query-replace-in-results @key{RET} @var{replacement} @key{RET} +@itemx C-u 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. @@ -2362,13 +2363,16 @@ shown. The default value is @code{nil}, which just shows the results in the @file{*xref*} buffer, but doesn't select any of them. @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 -files where these identifiers are referenced. This is useful when you + @kbd{M-x xref-query-replace-in-results} reads a @var{replacement} +string, just like ordinary @kbd{M-x query-replace-regexp}. It then +renames the identifiers shown in the @file{*xref*} buffer in all the +places in all the files where these identifiers are referenced, such +that their new name is @var{replacement}. This is useful when you rename your identifiers as part of refactoring. This command should -be invoked in the @file{*xref*} buffer generated by @kbd{M-?}. +be invoked in the @file{*xref*} buffer generated by @kbd{M-?}. With a +prefix argument, the command also prompts for a regexp to match +identifier names, and renames that regexp in the names of the matching +identifiers with @var{replacement}. @findex xref-find-references-and-replace @kbd{M-x xref-find-references-and-replace} works similarly to