Rename xref-query-replace to xref-query-replace-in-results
* lisp/progmodes/xref.el(xref-query-replace): Rename to xref-query-replace-in-results. (http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg01240.html) * lisp/progmodes/xref.el (xref--xref-buffer-mode-map): * lisp/dired-aux.el (dired-do-find-regexp-and-replace): * doc/emacs/dired.texi (Operating on Files): * doc/emacs/maintaining.texi (Xref Commands) (Identifier Search, Identifier Search): Update accordingly.
This commit is contained in:
parent
62f4ed477e
commit
3f481ad007
5 changed files with 14 additions and 14 deletions
|
@ -797,8 +797,8 @@ Perform @code{query-replace-regexp} on each of the specified files,
|
||||||
replacing matches for @var{regexp} with the string
|
replacing matches for @var{regexp} with the string
|
||||||
@var{to} (@code{dired-do-find-regexp-and-replace}).
|
@var{to} (@code{dired-do-find-regexp-and-replace}).
|
||||||
|
|
||||||
This command is a variant of @code{xref-query-replace}. It presents
|
This command is a variant of @code{xref-query-replace-in-results}. It
|
||||||
an @file{*xref*} buffer that lists all the matches of @var{regexp},
|
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
|
and you can use the special commands in that buffer (@pxref{Xref
|
||||||
Commands}). In particular, if you exit the query replace loop, you
|
Commands}). In particular, if you exit the query replace loop, you
|
||||||
can use @kbd{r} in that buffer to replace more matches.
|
can use @kbd{r} in that buffer to replace more matches.
|
||||||
|
|
|
@ -1875,11 +1875,11 @@ Move to the previous reference and display it in the other window
|
||||||
@findex xref-show-location-at-point
|
@findex xref-show-location-at-point
|
||||||
Display the reference on the current line in the other window
|
Display the reference on the current line in the other window
|
||||||
(@code{xref-show-location-at-point}).
|
(@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}
|
@item r @var{pattern} @key{RET} @var{replacement} @key{RET}
|
||||||
Perform interactive query-replace on references that match
|
Perform interactive query-replace on references that match
|
||||||
@var{pattern} (@code{xref-query-replace}), replacing the match with
|
@var{pattern} (@code{xref-query-replace-in-results}), replacing
|
||||||
@var{replacement}. @xref{Identifier Search}.
|
the match with @var{replacement}. @xref{Identifier Search}.
|
||||||
@findex xref-quit
|
@findex xref-quit
|
||||||
@item q
|
@item q
|
||||||
Quit the window showing the @file{*xref*} buffer (@code{xref-quit}).
|
Quit the window showing the @file{*xref*} buffer (@code{xref-quit}).
|
||||||
|
@ -1901,7 +1901,7 @@ them.
|
||||||
@table @kbd
|
@table @kbd
|
||||||
@item M-?
|
@item M-?
|
||||||
Find all the references for the identifier at point.
|
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
|
Interactively replace @var{regexp} with @var{replacement} in the names
|
||||||
of all the identifiers shown in the @file{*xref*} buffer.
|
of all the identifiers shown in the @file{*xref*} buffer.
|
||||||
@item M-x tags-search @key{RET} @var{regexp} @key{RET}
|
@item M-x tags-search @key{RET} @var{regexp} @key{RET}
|
||||||
|
@ -1923,8 +1923,8 @@ identifier, showing the file name and the line where the identifier is
|
||||||
referenced. The XREF mode commands are available in this buffer, see
|
referenced. The XREF mode commands are available in this buffer, see
|
||||||
@ref{Xref Commands}.
|
@ref{Xref Commands}.
|
||||||
|
|
||||||
@findex xref-query-replace
|
@findex xref-query-replace-in-results
|
||||||
@kbd{M-x xref-query-replace} reads a regexp to match identifier
|
@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
|
names and a replacement string, just like ordinary @kbd{M-x
|
||||||
query-replace-regexp}. It then performs the specified replacement in
|
query-replace-regexp}. It then performs the specified replacement in
|
||||||
the names of the matching identifiers in all the places in all the
|
the names of the matching identifiers in all the places in all the
|
||||||
|
|
4
etc/NEWS
4
etc/NEWS
|
@ -1162,8 +1162,8 @@ compression command is determined from the new
|
||||||
+++
|
+++
|
||||||
*** New user interface for the `A' and `Q' commands.
|
*** New user interface for the `A' and `Q' commands.
|
||||||
These keys, now bound to `dired-do-find-regexp' and
|
These keys, now bound to `dired-do-find-regexp' and
|
||||||
`dired-do-find-regexp-and-replace', work similarly to
|
`dired-do-find-regexp-and-replace', work similarly to `xref-find-apropos'
|
||||||
`xref-find-apropos' and `xref-query-replace': they present the matches
|
and `xref-query-replace-in-results': they present the matches
|
||||||
in the `*xref*' buffer and let you move through the matches. No need
|
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
|
to use `tags-loop-continue' to resume the search or replace loop. The
|
||||||
previous commands, `dired-do-search' and
|
previous commands, `dired-do-search' and
|
||||||
|
|
|
@ -2714,7 +2714,7 @@ with the command \\[tags-loop-continue]."
|
||||||
'(dired-get-marked-files nil nil 'dired-nondirectory-p)))
|
'(dired-get-marked-files nil nil 'dired-nondirectory-p)))
|
||||||
|
|
||||||
(declare-function xref--show-xrefs "xref")
|
(declare-function xref--show-xrefs "xref")
|
||||||
(declare-function xref-query-replace "xref")
|
(declare-function xref-query-replace-in-results "xref")
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun dired-do-find-regexp (regexp)
|
(defun dired-do-find-regexp (regexp)
|
||||||
|
@ -2746,7 +2746,7 @@ with the command \\[tags-loop-continue]."
|
||||||
"Query replace regexp in marked files" t t)))
|
"Query replace regexp in marked files" t t)))
|
||||||
(list (nth 0 common) (nth 1 common))))
|
(list (nth 0 common) (nth 1 common))))
|
||||||
(with-current-buffer (dired-do-find-regexp from)
|
(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)
|
(defun dired-nondirectory-p (file)
|
||||||
(not (file-directory-p file)))
|
(not (file-directory-p file)))
|
||||||
|
|
|
@ -502,7 +502,7 @@ WINDOW controls how the buffer is displayed:
|
||||||
(xref-quit)
|
(xref-quit)
|
||||||
(xref--pop-to-location xref window)))
|
(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.
|
"Perform interactive replacement of FROM with TO in all displayed xrefs.
|
||||||
|
|
||||||
This command interactively replaces FROM with TO in the names of the
|
This command interactively replaces FROM with TO in the names of the
|
||||||
|
@ -589,7 +589,7 @@ references displayed in the current *xref* buffer."
|
||||||
(define-key map [remap quit-window] #'xref-quit)
|
(define-key map [remap quit-window] #'xref-quit)
|
||||||
(define-key map (kbd "n") #'xref-next-line)
|
(define-key map (kbd "n") #'xref-next-line)
|
||||||
(define-key map (kbd "p") #'xref-prev-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 "RET") #'xref-goto-xref)
|
||||||
(define-key map (kbd "C-o") #'xref-show-location-at-point)
|
(define-key map (kbd "C-o") #'xref-show-location-at-point)
|
||||||
;; suggested by Johan Claesson "to further reduce finger movement":
|
;; suggested by Johan Claesson "to further reduce finger movement":
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue