annotate doc/man/etags.1 @ 87917:8eb3fa6a88e5

*** empty log message ***
author Martin Rudalics <rudalics@gmx.at>
date Wed, 23 Jan 2008 10:29:49 +0000
parents 107ccd98fa12
children 187da50507c8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
1 .\" Copyright (C) 1992, 2001, 2002, 2003, 2004,
87649
107ccd98fa12 Merge from emacs--rel--22
Miles Bader <miles@gnu.org>
parents: 86317
diff changeset
2 .\" 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
3 .\" See section COPYING for conditions for redistribution
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
4 .TH etags 1 "23nov2001" "GNU Tools" "GNU Tools"
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
5 .de BP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
6 .sp
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
7 .ti -.2i
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
8 \(**
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
9 ..
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
10
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
11 .SH NAME
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
12 etags, ctags \- generate tag file for Emacs, vi
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
13 .SH SYNOPSIS
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
14 .hy 0
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
15 .na
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
16 \fBetags\fP [\|\-aCDGIRVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
17 .if n .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
18 [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
19 [\|\-\-parse\-stdin=\fIfile\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
20 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
21 [\|\-\-append\|] [\|\-\-no\-defines\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
22 [\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
23 [\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
24 [\|\-\-no\-members\|] [\|\-\-output=\fItagfile\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
25 [\|\-\-regex=\fIregexp\fP\|] [\|\-\-no\-regex\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
26 [\|\-\-help\|] [\|\-\-version\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
27 \fIfile\fP .\|.\|.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
28
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
29 \fBctags\fP [\|\-aCdgIRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
30 .if n .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
31 [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
32 [\|\-\-parse\-stdin=\fIfile\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
33 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
34 [\|\-\-append\|] [\|\-\-backward\-search\|]
86317
2aa93dd1b1cb Ctags and Etags now share the same defaults, so remove
Francesco Potortì <pot@gnu.org>
parents: 86089
diff changeset
35 [\|\-\-cxref\|] [\|\-\-no\-defines\|] [\|\-\-forward\-search\|]
2aa93dd1b1cb Ctags and Etags now share the same defaults, so remove
Francesco Potortì <pot@gnu.org>
parents: 86089
diff changeset
36 [\|\-\-no\-globals\|] [\|\-\-ignore\-indentation\|]
2aa93dd1b1cb Ctags and Etags now share the same defaults, so remove
Francesco Potortì <pot@gnu.org>
parents: 86089
diff changeset
37 [\|\-\-language=\fIlanguage\fP\|] [\|\-\-no\-members\|]
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
38 [\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
39 [\|\-\-update\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
40 [\|\-\-help\|] [\|\-\-version\|]
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
41 \fIfile\fP .\|.\|.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
42 .ad b
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
43 .hy 1
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
44 .SH DESCRIPTION
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
45 The \|\fBetags\fP\| program is used to create a tag table file, in a format
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
46 understood by
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
47 .BR emacs ( 1 )\c
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
48 \&; the \|\fBctags\fP\| program is used to create a similar table in a
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
49 format understood by
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
50 .BR vi ( 1 )\c
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
51 \&. Both forms of the program understand
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
52 the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang, HTML,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
53 LaTeX, Emacs Lisp/Common Lisp, Lua, makefile, Pascal, Perl, PHP, Postscript,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
54 Python, Prolog, Scheme and
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
55 most assembler\-like syntaxes.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
56 Both forms read the files specified on the command line, and write a tag
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
57 table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
58 \fBctags\fP) in the current working directory.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
59 Files specified with relative file names will be recorded in the tag
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
60 table with file names relative to the directory where the tag table
86089
127279e2403a Note that you can use "-" with -o in Etags.
Francesco Potortì <pot@gnu.org>
parents: 83913
diff changeset
61 resides. If the tag table is in /dev or is the standard output,
127279e2403a Note that you can use "-" with -o in Etags.
Francesco Potortì <pot@gnu.org>
parents: 83913
diff changeset
62 however, the file names are made relative to the working directory.
127279e2403a Note that you can use "-" with -o in Etags.
Francesco Potortì <pot@gnu.org>
parents: 83913
diff changeset
63 Files specified with absolute file names will be recorded
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
64 with absolute file names. Files generated from a source file\-\-like
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
65 a C file generated from a source Cweb file\-\-will be recorded with
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
66 the name of the source file.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
67 The programs recognize the language used in an input file based on its
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
68 file name and contents. The \fB\-\-language\fP switch can be used to force
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
69 parsing of the file names following the switch according to the given
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
70 language, overriding guesses based on filename extensions.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
71 .SH OPTIONS
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
72 Some options make sense only for the \fBvi\fP style tag files produced
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
73 by ctags;
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
74 \fBetags\fP does not recognize them.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
75 The programs accept unambiguous abbreviations for long option names.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
76 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
77 .B \-a, \-\-append
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
78 Append to existing tag file. (For \fBvi\fP-format tag files, see also
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
79 \fB\-\-update\fP.)
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
80 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
81 .B \-B, \-\-backward\-search
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
82 Tag files written in the format expected by \fBvi\fP contain regular
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
83 expression search instructions; the \fB\-B\fP option writes them using
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
84 the delimiter `\|\fB?\fP\|', to search \fIbackwards\fP through files.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
85 The default is to use the delimiter `\|\fB/\fP\|', to search \fIforwards\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
86 through files.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
87 Only \fBctags\fP accepts this option.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
88 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
89 .B \-\-declarations
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
90 In C and derived languages, create tags for function declarations,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
91 and create tags for extern variables unless \-\-no\-globals is used.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
92 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
93 .B \-D, \-\-no\-defines
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
94 Do not create tag entries for C preprocessor constant definitions
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
95 and enum constants.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
96 This may make the tags file much smaller if many header files are tagged.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
97 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
98 .B \-\-no\-globals
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
99 Do not tag global variables. Typically this reduces the file size by
86317
2aa93dd1b1cb Ctags and Etags now share the same defaults, so remove
Francesco Potortì <pot@gnu.org>
parents: 86089
diff changeset
100 one fourth.
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
101 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
102 \fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
103 Include a note in the tag file indicating that, when searching for a
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
104 tag, one should also consult the tags file \fIfile\fP after checking the
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
105 current file. Only \fBetags\fP accepts this option.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
106 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
107 .B \-I, \-\-ignore\-indentation
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
108 Don't rely on indentation as much as we normally do. Currently, this
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
109 means not to assume that a closing brace in the first column is the
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
110 final brace of a function or structure definition in C and C++.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
111 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
112 \fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
113 Parse the following files according to the given language. More than
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
114 one such options may be intermixed with filenames. Use \fB\-\-help\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
115 to get a list of the available languages and their default filename
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
116 extensions. The `auto' language can be used to restore automatic
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
117 detection of language based on the file name. The `none'
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
118 language may be used to disable language parsing altogether; only
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
119 regexp matching is done in this case (see the \fB\-\-regex\fP option).
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
120 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
121 .B \-\-members
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
122 Create tag entries for variables that are members of structure-like
86317
2aa93dd1b1cb Ctags and Etags now share the same defaults, so remove
Francesco Potortì <pot@gnu.org>
parents: 86089
diff changeset
123 constructs in C++, Objective C, Java. This is the default.
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
124 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
125 .B \-\-no\-members
86317
2aa93dd1b1cb Ctags and Etags now share the same defaults, so remove
Francesco Potortì <pot@gnu.org>
parents: 86089
diff changeset
126 Do not tag member variables.
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
127 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
128 .B \-\-packages\-only
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
129 Only tag packages in Ada files.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
130 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
131 \fB\-\-parse\-stdin=\fIfile\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
132 May be used (only once) in place of a file name on the command line.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
133 \fBetags\fP will read from standard input and mark the produced tags
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
134 as belonging to the file \fBFILE\fP.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
135 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
136 \fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP
86089
127279e2403a Note that you can use "-" with -o in Etags.
Francesco Potortì <pot@gnu.org>
parents: 83913
diff changeset
137 Explicit name of file for tag table; for \fBetags\fP only, a file name
127279e2403a Note that you can use "-" with -o in Etags.
Francesco Potortì <pot@gnu.org>
parents: 83913
diff changeset
138 of \- means standard output; overrides default \fBTAGS\fP or \fBtags\fP.
127279e2403a Note that you can use "-" with -o in Etags.
Francesco Potortì <pot@gnu.org>
parents: 83913
diff changeset
139 (But ignored with \fB\-v\fP or \fB\-x\fP.)
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
140 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
141 \fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
142
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
143 Make tags based on regexp matching for the files following this option,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
144 in addition to the tags made with the standard parsing based on
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
145 language. May be freely intermixed with filenames and the \fB\-R\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
146 option. The regexps are cumulative, i.e. each such option will add to
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
147 the previous ones. The regexps are of one of the forms:
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
148 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
149 [\fB{\fP\fIlanguage\fP\fB}\fP]\fB/\fP\fItagregexp/\fP[\fInameregexp\fP\fB/\fP]\fImodifiers\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
150 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
151 \fB@\fP\fIregexfile\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
152 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
153
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
154 where \fItagregexp\fP is used to match the tag. It should not match
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
155 useless characters. If the match is such that more characters than
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
156 needed are unavoidably matched by \fItagregexp\fP, it may be useful to
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
157 add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
158 ignores regexps without a \fInameregexp\fP. The syntax of regexps is
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
159 the same as in emacs. The following character escape sequences are
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
160 supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
161 respectively stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
162 CR, TAB, VT.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
163 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
164 The \fImodifiers\fP are a sequence of 0 or more characters among
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
165 \fIi\fP, which means to ignore case when matching; \fIm\fP, which means
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
166 that the \fItagregexp\fP will be matched against the whole file contents
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
167 at once, rather than line by line, and the matching sequence can match
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
168 multiple lines; and \fIs\fP, which implies \fIm\fP and means that the
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
169 dot character in \fItagregexp\fP matches the newline char as well.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
170 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
171 The separator, which is \fB/\fP in the examples, can be any character
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
172 different from space, tab, braces and \fB@\fP. If the separator
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
173 character is needed inside the regular expression, it must be quoted
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
174 by preceding it with \fB\\\fP.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
175 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
176 The optional \fB{\fP\fIlanguage\fP\fB}\fP prefix means that the tag
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
177 should be
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
178 created only for files of language \fIlanguage\fP, and ignored
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
179 otherwise. This is particularly useful when storing many predefined
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
180 regexps in a file.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
181 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
182 In its second form, \fIregexfile\fP is the name of a file that contains
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
183 a number of arguments to the \fI\-\-regex\=\fP option,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
184 one per line. Lines beginning with a space or tab are assumed
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
185 to be comments, and ignored.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
186
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
187 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
188 Here are some examples. All the regexps are quoted to protect them
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
189 from shell interpretation.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
190 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
191
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
192 Tag the DEFVAR macros in the emacs source files:
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
193 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
194 \fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"/'\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
195 .\"" This comment is to avoid confusion to Emacs syntax highlighting
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
196 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
197
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
198 Tag VHDL files (this example is a single long line, broken here for
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
199 formatting reasons):
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
200 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
201 \fI\-\-language\=none\ \-\-regex='/[\ \\t]*\\(ARCHITECTURE\\|\\
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
202 CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex\='/[\ \\t]*\\
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
203 \\(ATTRIBUTE\\|ENTITY\\|FUNCTION\\|PACKAGE\\(\ BODY\\)?\\
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
204 \\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
205 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
206
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
207 Tag TCL files (this last example shows the usage of a \fItagregexp\fP):
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
208 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
209 \fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
210
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
211 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
212 A regexp can be preceded by {\fIlang\fP}, thus restricting it to match
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
213 lines of files of the specified language. Use \fBetags \-\-help\fP to obtain
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
214 a list of the recognised languages. This feature is particularly useful inside
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
215 \fBregex files\fP. A regex file contains one regex per line. Empty lines,
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
216 and those lines beginning with space or tab are ignored. Lines beginning
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
217 with @ are references to regex files whose name follows the @ sign. Other
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
218 lines are considered regular expressions like those following \fB\-\-regex\fP.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
219 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
220 For example, the command
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
221 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
222 \fIetags \-\-regex=@regex.file *.c\fP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
223 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
224 reads the regexes contained in the file regex.file.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
225 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
226 .B \-R, \-\-no\-regex
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
227 Don't do any more regexp matching on the following files. May be
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
228 freely intermixed with filenames and the \fB\-\-regex\fP option.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
229 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
230 .B \-u, \-\-update
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
231 Update tag entries for \fIfiles\fP specified on command line, leaving
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
232 tag entries for other files in place. Currently, this is implemented
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
233 by deleting the existing entries for the given files and then
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
234 rewriting the new entries at the end of the tags file. It is often
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
235 faster to simply rebuild the entire tag file than to use this.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
236 Only \fBctags\fP accepts this option.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
237 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
238 .B \-v, \-\-vgrind
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
239 Instead of generating a tag file, write index (in \fBvgrind\fP format)
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
240 to standard output. Only \fBctags\fP accepts this option.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
241 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
242 .B \-x, \-\-cxref
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
243 Instead of generating a tag file, write a cross reference (in
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
244 \fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
245 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
246 .B \-h, \-H, \-\-help
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
247 Print usage information. Followed by one or more \-\-language=LANG
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
248 prints detailed information about how tags are created for LANG.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
249 .TP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
250 .B \-V, \-\-version
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
251 Print the current version of the program (same as the version of the
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
252 emacs \fBetags\fP is shipped with).
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
253
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
254 .SH "SEE ALSO"
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
255 `\|\fBemacs\fP\|' entry in \fBinfo\fP; \fIGNU Emacs Manual\fP, Richard
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
256 Stallman.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
257 .br
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
258 .BR cxref ( 1 ),
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
259 .BR emacs ( 1 ),
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
260 .BR vgrind ( 1 ),
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
261 .BR vi ( 1 ).
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
262
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
263 .SH COPYING
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
264 Copyright
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
265 .if t \(co
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
266 .if n (c)
87649
107ccd98fa12 Merge from emacs--rel--22
Miles Bader <miles@gnu.org>
parents: 86317
diff changeset
267 1999, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
83913
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
268 .PP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
269 Permission is granted to make and distribute verbatim copies of this
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
270 document provided the copyright notice and this permission notice are
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
271 preserved on all copies.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
272 .PP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
273 Permission is granted to copy and distribute modified versions of
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
274 this document under the conditions for verbatim copying, provided that
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
275 the entire resulting derived work is distributed under the terms of
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
276 a permission notice identical to this one.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
277 .PP
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
278 Permission is granted to copy and distribute translations of this
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
279 document into another language, under the above conditions for
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
280 modified versions, except that this permission notice may be stated
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
281 in a translation approved by the Free Software Foundation.
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
282
a6f4778a1ad7 Move here from ../../etc/
Glenn Morris <rgm@gnu.org>
parents:
diff changeset
283 .\" arch-tag: 9534977f-af78-42f0-991d-1df6b6c05573