mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 14:30:50 -08:00
Improve documentation of M-?
* doc/emacs/maintaining.texi (Identifier Search): * lisp/progmodes/xref.el (xref-find-references): Improve documentation of xref-find-references and xref-prompt-for-identifier. (Bug#32389)
This commit is contained in:
parent
155a885158
commit
cd9032532d
2 changed files with 13 additions and 4 deletions
|
|
@ -1966,9 +1966,14 @@ Restart one of the last 2 commands above, from the current location of point.
|
||||||
|
|
||||||
@kindex M-?
|
@kindex M-?
|
||||||
@findex xref-find-references
|
@findex xref-find-references
|
||||||
@kbd{M-?} finds all the references for the identifier at point. If
|
@kbd{M-?} finds all the references for the identifier at point,
|
||||||
there's no identifier at point, or when invoked with a prefix
|
prompting for the identifier as needed, with completion. Depending on
|
||||||
argument, the command prompts for the identifier, with completion. It
|
the current backend (@pxref{Xref}), the command may prompt even if it
|
||||||
|
finds a valid identifier at point. When invoked with a prefix
|
||||||
|
argument, it always prompts for the identifier. (If you want it to
|
||||||
|
prompt always, customize the value of the variable
|
||||||
|
@code{xref-prompt-for-identifier} to @code{t}; or set it to @code{nil}
|
||||||
|
to prompt only if there's no usable identifier at point.) The command
|
||||||
then presents the @file{*xref*} buffer with all the references to the
|
then presents the @file{*xref*} buffer with all the references to the
|
||||||
identifier, showing the file name and the line where the identifier is
|
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
|
||||||
|
|
|
||||||
|
|
@ -866,7 +866,11 @@ buffer where the user can select from the list."
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun xref-find-references (identifier)
|
(defun xref-find-references (identifier)
|
||||||
"Find references to the identifier at point.
|
"Find references to the identifier at point.
|
||||||
With prefix argument, prompt for the identifier."
|
This command might prompt for the identifier as needed, perhaps
|
||||||
|
offering the symbol at point as the default.
|
||||||
|
With prefix argument, or if `xref-prompt-for-identifier' is t,
|
||||||
|
always prompt for the identifier. If `xref-prompt-for-identifier'
|
||||||
|
is nil, prompt only if there's no usable symbol at point."
|
||||||
(interactive (list (xref--read-identifier "Find references of: ")))
|
(interactive (list (xref--read-identifier "Find references of: ")))
|
||||||
(xref--find-xrefs identifier 'references identifier nil))
|
(xref--find-xrefs identifier 'references identifier nil))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue