emacs-diffs
[Top][All Lists]
Advanced

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

master 3ae74c2e47: Improve documentation of 'xref-find-references-and-re


From: Eli Zaretskii
Subject: master 3ae74c2e47: Improve documentation of 'xref-find-references-and-replace'
Date: Fri, 14 Jan 2022 02:42:08 -0500 (EST)

branch: master
commit 3ae74c2e478e65de2cdc78013c0d6524b97442c0
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Improve documentation of 'xref-find-references-and-replace'
    
    * etc/NEWS: Clarify the 'xref-find-references-and-replace' entry.
    
    * doc/emacs/maintaining.texi (Identifier Search): Document
    'xref-find-references-and-replace'.
---
 doc/emacs/maintaining.texi | 9 +++++++++
 etc/NEWS                   | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 9a23f23e0e..e508e87b8d 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -2321,6 +2321,10 @@ Find all the references for the identifier at point.
 Interactively replace @var{regexp} with @var{replacement} in the names
 of all the identifiers shown in the @file{*xref*} buffer.
 
+@item M-x xref-find-references-and-replace @key{RET} @var{from} @key{RET} 
@var{to} @key{RET}
+Interactively rename all instances of the identifier @var{from} to the
+new name @var{to}.
+
 @item M-x tags-search @key{RET} @var{regexp} @key{RET}
 Search for @var{regexp} through the files in the selected tags
 table.
@@ -2366,6 +2370,11 @@ files where these identifiers are referenced.  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-?}.
 
+@findex xref-find-references-and-replace
+  @kbd{M-x xref-find-references-and-replace} works similarly to
+@code{xref-query-replace-in-results}, but is more convenient when you
+want to rename a single identifier specified by its name @var{from}.
+
 @findex tags-search
   @kbd{M-x tags-search} reads a regexp using the minibuffer, then
 searches for matches in all the files in the selected tags table, one
diff --git a/etc/NEWS b/etc/NEWS
index 2f0fe00555..ea9ba49892 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -598,7 +598,7 @@ It is bound to 'C-M-,' and jumps to the location where 
'xref-go-back'
 called without prefix argument, to make the most common case faster:
 replacing entire matches.
 
-*** New command 'xref-find-references-and-replace'.
+*** New command 'xref-find-references-and-replace' to rename one identifier.
 
 ** File notifications
 



reply via email to

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