Penguin
Annotated edit history of etags(1) version 2, including all changes. View license author blame.
Rev Author # Line
1 perry 1 etags
2 !!!etags
3 NAME
4 SYNOPSIS
5 DESCRIPTION
6 OPTIONS
7 SEE ALSO
8 COPYING
9 ----
10 !!NAME
11
12
13 etags, ctags - generate tag file for Emacs, vi
14 !!SYNOPSIS
15
16
17 __etags [[-aCDRSVh] [[-i__ ''file''__] [[-l__
18 ''language''__] [[-i__ ''regexp''__] [[-o__
19 ''tagfile''__]__
20 [[--c++] [[--no-defines] [[--ignore-indentation]
21 [[--language=''language''] [[--regex=''regexp'']
22 [[--no-regexp] [[--help] [[--version] [[--include=''file'']
23 [[--output=''tagfile''] [[--append] ''file''
24 ...
25
26
2 perry 27 __ctags [[-aCdRSVh] [[-!BtTuvwx] [[-l__
1 perry 28 ''language''__]__
29 [[-i ''regexp''] [[-o ''tagfile''] [[--c++] [[--defines]
30 [[--ignore-indentation] [[--no-warn] [[--cxref]
31 [[--backward-search] [[--forward-search] [[--typedefs]
32 [[--typedefs-and-c++] [[--language=''language'']
33 [[--regex=''regexp''] [[--help] [[--version]
34 [[--output=''tagfile''] [[--append] [[--update] ''file''
35 ...
36 !!DESCRIPTION
37
38
39 The `__etags__' program is used to create a tag table
40 file, in a format understood by __emacs__(__1__); the
41 `__ctags__' program is used to create a similar table in
42 a format understood by __vi__(__1__). Both forms of
43 the program understand the syntax of C, C++, Fortran,
44 Pascal, LaTeX, Scheme, Emacs Lisp/Common Lisp, Erlang,
45 Prolog and most assembler-like syntaxes. Both forms read the
46 files specified on the command line, and write a tag table
47 (defaults: `TAGS' for __etags__, `tags' for __ctags__)
48 in the current working directory. Files speci- fied with
49 relative file names will be recorded in the tag table with
50 file names relative to the directory where the tag table
51 resides. Files specified with absolute file names will be
52 recorded with absolute file names. The pro- grams recognize
53 the language used in an input file based on its file name
54 and contents. The --language switch can be used to force
55 parsing of the file names following the switch according to
56 the given language, overriding guesses based on filename
57 extensions.
58 !!OPTIONS
59
60
61 Some options make sense only for the __vi__ style tag
62 files produced by ctags; __etags__ does not recognize
63 them. The programs accept unambiguous abbreviations for long
64 option names.
65
66
67 __-a, --append__
68
69
70 Append to existing tag file. (For vi-format tag files, see
71 also __--update__.)
72
73
74 __-B, --backward-search__
75
76
77 Tag files written in the format expected by __vi__ con-
78 tain regular expression search instructions; the __-B__
79 option writes them using the delimiter `__?__', to search
80 ''backwards'' through files. The default is to use the
81 delimiter `__/__', to search ''forwards'' through
82 files. Only __ctags__ accepts this option.
83
84
85 __-C, --c++__
86
87
88 Treat files with `.c' and `.h' extensions as C++ code, not C
89 code. Files with `.C', `.H', `.cxx', `.hxx', or `.cc'
90 extensions are always assumed to be C++ code.
91
92
93 __-d, --defines__
94
95
96 Create tag entries for C preprocessor definitions, too. This
97 is the default behavior for __etags__, so this option is
98 only accepted by __ctags__.
99
100
101 __-D, --no-defines__
102
103
104 Do not create tag entries for C preprocessor defi- nitions.
105 This may make the tags file much smaller if many header
106 files are tagged. This is the de- fault behavior for
107 __ctags__, so this option is only accepted by
108 __etags__.
109
110
111 __-l__ ''language'',
112 __--language=__''language''
113
114
115 Parse the following files according to the given language.
116 More than one such options may be inter- mixed with
117 filenames. Use __--help__ to get a list of the available
118 languages and their default filename extensions. The `auto'
119 language can be used to re- store automatic detection of
120 language based on filename extension. The `none' language
121 may be used to disable language parsing altogether; only
122 regexp matching is done in this case (see the __--regex__
123 option).
124
125
126 __-o__ ''tagfile'',
127 __--output=__''tagfile''
128
129
130 Explicit name of file for tag table; overrides de- fault
131 `TAGS' or `tags'. (But ignored with __-v__ or
132 __-x__.)
133
134
135 __-r__ ''regexp'',
136 __--regex=__''regexp''
137
138
139 Make tags based on regexp matching for each line of the
140 files following this option, in addition to the tags made
141 with the standard parsing based on lan- guage. May be freely
142 intermixed with filenames and the __-R__ option. The
143 regexps are cumulative, i.e. each option will add to the
144 previous ones. The regexps are of the form:
145
146
147 __/__''tagregexp''[[__/__''nameregexp'']__/__
148
149
150 where ''tagregexp'' is used to match the lines that must
151 be tagged. It should not match useless char- acters. If the
152 match is such that more characters than needed are
153 unavoidably matched by ''tagregexp'', it may be useful to
154 add a ''nameregexp'', to narrow down the tag scope.
155 __ctags__ ignores regexps without a
156 ''nameregexp''.
157 Here are some examples. All the regexps are quoted to
158 protect them from shell interpretation.
159
160
161 Tag the DEFVAR macros in the emacs source files:''
162 --regex='/[[ t]*DEFVAR_[[A-Z_
163 t(]+
164
165
166 Tag VHDL files (this example is a single long line, broken
167 here for formatting reasons):''
168 --language=none --regex='/[[ t]* CONFIGURATION) +[[^ ]* +OF/'
169 --regex='/[[ t]*\ BODY)?\ |PROCEDURE|PROCESS|TYPE)[[ t]+
170 t(]+)/3/'''
171
172
173 Tag Cobol files:''
174 --language=none
175 --regex='/.......[[a-zA-Z0-9-]+./'''
176
177
178 Tag Postscript files:''
179 --language=none --regex='#/[[^ t{]+#/'''
180
181
182 Tag TCL files (this last example shows the usage of a
183 ''tagregexp''):''
184 --lang=none --regex='/proc[[ t]+ t]+)/1/'''
185
186
187 __-R, --no-regex__
188
189
190 Don't do any more regexp matching on the following files.
191 May be freely intermixed with filenames and the
192 __--regex__ option.
193
194
195 __-S, --ignore-indentation__
196
197
198 Don't rely on indentation as much as we normally do.
199 Currently, this means not to assume that a closing brace in
200 the first column is the final brace of a function or
201 structure definition in C and C++.
202
203
204 __-t, --typedefs__
205
206
207 Record typedefs in C code as tags. Since this is the default
208 behaviour of __etags__, only __ctags__ accepts this
209 option.
210
211
212 __-T, --typedefs-and-c++__
213
214
215 Generate tag entries for typedefs, struct, enum, and union
216 tags, and C++ member functions. Since this is the default
217 behaviour of __etags__, only __ctags__ accepts this
218 option.
219
220
221 __-u, --update__
222
223
224 Update tag entries for ''files'' specified on command
225 line, leaving tag entries for other files in place.
226 Currently, this is implemented by deleting the ex- isting
227 entries for the given files and then rewrit- ing the new
228 entries at the end of the tags file. It is often faster to
229 simply rebuild the entire tag file than to use this. Only
230 __ctags__ accepts this op- tion.
231
232
233 __-v, --vgrind__
234
235
236 Instead of generating a tag file, write index (in
237 __vgrind__ format) to standard output. Only __ctags__
238 ac- cepts this option.
239
240
241 __-w, --no-warn__
242
243
244 Suppress warning messages about duplicate entries. The
245 __etags__ program does not check for duplicate en- tries,
246 so this option is not allowed with it.
247
248
249 __-x, --cxref__
250
251
252 Instead of generating a tag file, write a cross reference
253 (in __cxref__ format) to standard output. Only
254 __ctags__ accepts this option.
255
256
257 __-H, --help__
258
259
260 Print usage information.
261
262
263 __-V, --version__
264
265
266 Print the current version of the program (same as the
267 version of the emacs __etags__ is shipped
268 with).
269 !!SEE ALSO
270
271
272 `__emacs__' entry in __info__; ''GNU Emacs
273 Manual'', Richard Stallman.__
274 cxref__(__1__), __emacs__(__1__),
275 __vgrind__(__1__), __vi__(__1__).
276 !!COPYING
277
278
279 Copyright (c) 1992 Free Software Foundation,
280 Inc.
281
282
283 Permission is granted to make and distribute verbatim copies
284 of this manual provided the copyright notice and this
285 permission notice are preserved on all copies.
286
287
288 Permission is granted to copy and distribute modified ver-
289 sions of this manual under the conditions for verbatim
290 copying, provided that the entire resulting derived work is
291 distributed under the terms of a permission notice identical
292 to this one.
293
294
295 Permission is granted to copy and distribute translations of
296 this manual into another language, under the above con-
297 ditions for modified versions, except that this permission
298 notice may be included in translations approved by the Free
299 Software Foundation instead of in the original En-
300 glish.
301 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.