diff options
| author | Eli Zaretskii | 2018-01-11 19:44:29 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2018-01-11 19:44:29 +0200 |
| commit | bd2a2a1e84a74b1c7d59dadc9221e667bd54d212 (patch) | |
| tree | df1aa923da1e8f08557516b3f18bc7161dc03bd1 | |
| parent | 7ba75b96373024f1f6c9b249f2337d7a58e8094c (diff) | |
| download | emacs-bd2a2a1e84a74b1c7d59dadc9221e667bd54d212.tar.gz emacs-bd2a2a1e84a74b1c7d59dadc9221e667bd54d212.zip | |
Improve documentation of etags
* doc/emacs/maintaining.texi (Tag Syntax, Create Tags Table):
Improve documentation of etags options and of source language
detection.
| -rw-r--r-- | doc/emacs/maintaining.texi | 43 |
1 files changed, 29 insertions, 14 deletions
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index aba76e501ab..0846440d1de 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi | |||
| @@ -2142,10 +2142,13 @@ to function definitions by giving the @samp{--declarations} option to | |||
| 2142 | @item | 2142 | @item |
| 2143 | In C++ code, in addition to all the tag constructs of C code, member | 2143 | In C++ code, in addition to all the tag constructs of C code, member |
| 2144 | functions are also recognized; member variables are also recognized, | 2144 | functions are also recognized; member variables are also recognized, |
| 2145 | unless you use the @samp{--no-members} option. Tags for variables and | 2145 | unless you use the @samp{--no-members} option. @code{operator} |
| 2146 | functions in classes are named @samp{@var{class}::@var{variable}} and | 2146 | definitions have tag names like @samp{operator+}. If you specify the |
| 2147 | @samp{@var{class}::@var{function}}. @code{operator} definitions have | 2147 | @samp{--class-qualify} option, tags for variables and functions in |
| 2148 | tag names like @samp{operator+}. | 2148 | classes are named @samp{@var{class}::@var{variable}} and |
| 2149 | @samp{@var{class}::@var{function}}. By default, class methods and | ||
| 2150 | members are not class-qualified, which allows to identify their names in | ||
| 2151 | the sources more accurately. | ||
| 2149 | 2152 | ||
| 2150 | @item | 2153 | @item |
| 2151 | In Java code, tags include all the constructs recognized in C++, plus | 2154 | In Java code, tags include all the constructs recognized in C++, plus |
| @@ -2324,7 +2327,9 @@ The @command{etags} program reads the specified files, and writes a tags | |||
| 2324 | table named @file{TAGS} in the current working directory. You can | 2327 | table named @file{TAGS} in the current working directory. You can |
| 2325 | optionally specify a different file name for the tags table by using the | 2328 | optionally specify a different file name for the tags table by using the |
| 2326 | @samp{--output=@var{file}} option; specifying @file{-} as a file name | 2329 | @samp{--output=@var{file}} option; specifying @file{-} as a file name |
| 2327 | prints the tags table to standard output. | 2330 | prints the tags table to standard output. You can also append the |
| 2331 | newly created tags table to an existing file by using the @samp{--append} | ||
| 2332 | option. | ||
| 2328 | 2333 | ||
| 2329 | If the specified files don't exist, @command{etags} looks for | 2334 | If the specified files don't exist, @command{etags} looks for |
| 2330 | compressed versions of them and uncompresses them to read them. Under | 2335 | compressed versions of them and uncompresses them to read them. Under |
| @@ -2381,15 +2386,25 @@ input, by typing a dash in place of the file names, like this: | |||
| 2381 | find . -name "*.[chCH]" -print | etags - | 2386 | find . -name "*.[chCH]" -print | etags - |
| 2382 | @end smallexample | 2387 | @end smallexample |
| 2383 | 2388 | ||
| 2384 | @command{etags} recognizes the language used in an input file based | 2389 | @command{etags} recognizes the language used in an input file based on |
| 2385 | on its file name and contents. You can specify the language | 2390 | its file name and contents. It first tries to match the file's name and |
| 2386 | explicitly with the @samp{--language=@var{name}} option. You can | 2391 | extension to the ones commonly used with certain languages. Some |
| 2387 | intermix these options with file names; each one applies to the file | 2392 | languages have interpreters with known names (e.g., @command{perl} for |
| 2388 | names that follow it. Specify @samp{--language=auto} to tell | 2393 | Perl or @command{pl} for Prolog), so @command{etags} next looks for an |
| 2389 | @command{etags} to resume guessing the language from the file names | 2394 | interpreter specification of the form @samp{#!@var{interp}} on the first |
| 2390 | and file contents. Specify @samp{--language=none} to turn off | 2395 | line of an input file, and matches that against known interpreters. If |
| 2391 | language-specific processing entirely; then @command{etags} recognizes | 2396 | none of that works, or if you want to override the automatic detection of |
| 2392 | tags by regexp matching alone (@pxref{Etags Regexps}). | 2397 | the language, you can specify the language explicitly with the |
| 2398 | @samp{--language=@var{name}} option. You can intermix these options with | ||
| 2399 | file names; each one applies to the file names that follow it. Specify | ||
| 2400 | @samp{--language=auto} to tell @command{etags} to resume guessing the | ||
| 2401 | language from the file names and file contents. Specify | ||
| 2402 | @samp{--language=none} to turn off language-specific processing entirely; | ||
| 2403 | then @command{etags} recognizes tags by regexp matching alone | ||
| 2404 | (@pxref{Etags Regexps}). This comes in handy when an input file uses a | ||
| 2405 | language not yet supported by @command{etags}, and you want to avoid | ||
| 2406 | having @command{etags} fall back on Fortran and C as the default | ||
| 2407 | languages. | ||
| 2393 | 2408 | ||
| 2394 | The option @samp{--parse-stdin=@var{file}} is mostly useful when | 2409 | The option @samp{--parse-stdin=@var{file}} is mostly useful when |
| 2395 | calling @command{etags} from programs. It can be used (only once) in | 2410 | calling @command{etags} from programs. It can be used (only once) in |