diff options
Diffstat (limited to 'lisp/progmodes/xref.el')
-rw-r--r-- | lisp/progmodes/xref.el | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index ac04b64ce59..47b4b3d15c8 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -751,17 +751,22 @@ quit the *xref* buffer." (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 +This function interactively replaces FROM with TO in the names of the references displayed in the current *xref* buffer. -When called interactively, it uses '.*' as FROM, which means -replace the whole name. Unless called with prefix argument, in -which case the user is prompted for both FROM and TO. +When called interactively, it uses '.*' as FROM, which means replace +the whole name, and prompts the user for TO. +If invoked with prefix argument, it prompts the user for both FROM and TO. As each match is found, the user must type a character saying what to do with it. Type SPC or `y' to replace the match, DEL or `n' to skip and go to the next match. For more directions, -type \\[help-command] at that time." +type \\[help-command] at that time. + +Note that this function cannot be used in *xref* buffers that show +a partial list of all references, such as the *xref* buffer created +by \\[xref-find-definitions] and its variants, since those list only +some of the references to the identifiers." (interactive (let* ((fr (if current-prefix-arg @@ -891,7 +896,8 @@ ITEMS is an xref item which " ; FIXME: Expand documentation. (setq pairs (cdr buf-pairs)) (setq continue (perform-replace from to t t nil nil multi-query-replace-map))) - (unless did-it-once (user-error "No suitable matches here")) + (unless did-it-once + (user-error "Cannot use subset of matches for global renaming")) (when (and continue (not buf-pairs)) (message "All results processed")))) |