aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2017-09-11 19:40:43 +0300
committerEli Zaretskii2017-09-11 19:40:43 +0300
commite33234ab9f387f56b3479359371c7d14d4f9e810 (patch)
tree6c0a86202ae78b8b9999397c37da6b4748cdaa36 /doc
parentaa4bb9de9dffda0669321505b64bb5f4551b9358 (diff)
downloademacs-e33234ab9f387f56b3479359371c7d14d4f9e810.tar.gz
emacs-e33234ab9f387f56b3479359371c7d14d4f9e810.zip
Improve documentation of etags-related features
* doc/emacs/maintaining.texi (Looking Up Identifiers): Document 'xref-prompt-for-identifier'. (Bug#28403) (Etags Regexps): Document \D back references in etags regexps.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/maintaining.texi31
1 files changed, 19 insertions, 12 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 6a592e2d51a..39b71445941 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1820,17 +1820,21 @@ Go back to where you previously invoked @kbd{M-.} and friends
1820 1820
1821@kindex M-. 1821@kindex M-.
1822@findex xref-find-definitions 1822@findex xref-find-definitions
1823@vindex xref-prompt-for-identifier
1823 @kbd{M-.}@: (@code{xref-find-definitions}) shows the definitions of 1824 @kbd{M-.}@: (@code{xref-find-definitions}) shows the definitions of
1824the identifier at point. With a prefix argument, or if there's no 1825the identifier at point. With a prefix argument, or if there's no
1825identifier at point, it prompts for the identifier. If the 1826identifier at point, it prompts for the identifier. (If you want it
1826identifier has only one definition, the command jumps to it. If the 1827to always prompt, customize @code{xref-prompt-for-identifier} to
1827identifier has more than one possible definition (e.g., in an 1828@code{t}.)
1828object-oriented language, or if there's a function and a variable by 1829
1829the same name), the command shows the candidate definitions in a 1830If the specified identifier has only one definition, the command jumps
1830@file{*xref*} buffer, together with the files in which these 1831to it. If the identifier has more than one possible definition (e.g.,
1831definitions are found. Selecting one of these candidates by typing 1832in an object-oriented language, or if there's a function and a
1832@kbd{@key{RET}} or clicking @kbd{mouse-2} will pop a buffer showing 1833variable by the same name), the command shows the candidate
1833the corresponding definition. 1834definitions in a @file{*xref*} buffer, together with the files in
1835which these definitions are found. Selecting one of these candidates
1836by typing @kbd{@key{RET}} or clicking @kbd{mouse-2} will pop a buffer
1837showing the corresponding definition.
1834 1838
1835 When entering the identifier argument to @kbd{M-.}, the usual 1839 When entering the identifier argument to @kbd{M-.}, the usual
1836minibuffer completion commands can be used (@pxref{Completion}), with 1840minibuffer completion commands can be used (@pxref{Completion}), with
@@ -2430,8 +2434,11 @@ needed to recognize what you want to tag. If the syntax requires you
2430to write @var{tagregexp} so it matches more characters beyond the tag 2434to write @var{tagregexp} so it matches more characters beyond the tag
2431itself, you should add a @var{nameregexp}, to pick out just the tag. 2435itself, you should add a @var{nameregexp}, to pick out just the tag.
2432This will enable Emacs to find tags more accurately and to do 2436This will enable Emacs to find tags more accurately and to do
2433completion on tag names more reliably. You can find some examples 2437completion on tag names more reliably. In @var{nameregexp}, it is
2434below. 2438frequently convenient to use ``back references'' (@pxref{Regexp
2439Backslash}) to parenthesized groupings @w{@samp{\( @dots{} \)}} in
2440@var{tagregexp}. For example, @samp{\1} refers to the first such
2441parenthesized grouping. You can find some examples of this below.
2435 2442
2436 The @var{modifiers} are a sequence of zero or more characters that 2443 The @var{modifiers} are a sequence of zero or more characters that
2437modify the way @command{etags} does the matching. A regexp with no 2444modify the way @command{etags} does the matching. A regexp with no
@@ -2479,7 +2486,7 @@ following example tags the @code{DEFVAR} macros in the Emacs source
2479files, for the C language only: 2486files, for the C language only:
2480 2487
2481@smallexample 2488@smallexample
2482--regex='@{c@}/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/' 2489--regex='@{c@}/[ \t]*DEFVAR_[A-Z_ \t(]+"\([^"]+\)"/\1/'
2483@end smallexample 2490@end smallexample
2484 2491
2485@noindent 2492@noindent