Mercurial > hg > xemacs-beta
comparison etc/etags.1 @ 2325:9d8bfee6e672
[xemacs-hg @ 2004-10-07 14:51:11 by james]
Update to author version 17.6.
author | james |
---|---|
date | Thu, 07 Oct 2004 14:51:19 +0000 |
parents | c33ae14dd6d0 |
children | 10ee8fade35d |
comparison
equal
deleted
inserted
replaced
2324:df2fafa399a1 | 2325:9d8bfee6e672 |
---|---|
1 .\" Copyright (c) 1992 Free Software Foundation | 1 .\" Copyright (c) 1992, 2001 Free Software Foundation |
2 .\" See section COPYING for conditions for redistribution | 2 .\" See section COPYING for conditions for redistribution |
3 .TH etags 1 "14gen2001" "GNU Tools" "GNU Tools" | 3 .TH etags 1 "23nov2001" "GNU Tools" "GNU Tools" |
4 .de BP | 4 .de BP |
5 .sp | 5 .sp |
6 .ti -.2i | 6 .ti -.2i |
7 \(** | 7 \(** |
8 .. | 8 .. |
10 .SH NAME | 10 .SH NAME |
11 etags, ctags \- generate tag file for Emacs, vi | 11 etags, ctags \- generate tag file for Emacs, vi |
12 .SH SYNOPSIS | 12 .SH SYNOPSIS |
13 .hy 0 | 13 .hy 0 |
14 .na | 14 .na |
15 .B etags [\|\-aCDGImRVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] | 15 \fBetags\fP [\|\-aCDGImRVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] |
16 .if n .br | 16 .if n .br |
17 .B [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|] | 17 [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|] |
18 .br | 18 [\|\-\-parse\-stdin=\fIfile\fP\|] |
19 .B [\|\-\-append\|] [\|\-\-no\-defines\|] | 19 .br |
20 .B [\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|] | 20 [\|\-\-append\|] [\|\-\-no\-defines\|] |
21 .B [\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|] | 21 [\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|] |
22 .B [\|\-\-members\|] [\|\-\-output=\fItagfile\fP\|] | 22 [\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|] |
23 .B [\|\-\-regex=\fIregexp\fP\|] [\|\-\-no\-regex\|] | 23 [\|\-\-members\|] [\|\-\-output=\fItagfile\fP\|] |
24 .B [\|\-\-ignore\-case\-regex=\fIregexp\fP\|] | 24 [\|\-\-regex=\fIregexp\fP\|] [\|\-\-no\-regex\|] |
25 .B [\|\-\-help\|] [\|\-\-version\|] | 25 [\|\-\-help\|] [\|\-\-version\|] |
26 \fIfile\fP .\|.\|. | 26 \fIfile\fP .\|.\|. |
27 | 27 |
28 .B ctags [\|\-aCdgImRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|] | 28 \fBctags\fP [\|\-aCdgImRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|] |
29 .if n .br | 29 .if n .br |
30 .B [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|] | 30 [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|] |
31 .br | 31 [\|\-\-parse\-stdin=\fIfile\fP\|] |
32 .B [\|\-\-append\|] [\|\-\-backward\-search\|] | 32 .br |
33 .B [\|\-\-cxref\|] [\|\-\-defines\|] [\|\-\-forward\-search\|] | 33 [\|\-\-append\|] [\|\-\-backward\-search\|] |
34 .B [\|\-\-globals\|] [\|\-\-ignore\-indentation\|] | 34 [\|\-\-cxref\|] [\|\-\-defines\|] [\|\-\-forward\-search\|] |
35 .B [\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|] | 35 [\|\-\-globals\|] [\|\-\-ignore\-indentation\|] |
36 .B [\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|] | 36 [\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|] |
37 .B [\|\-\-ignore\-case\-regex=\fIregexp\fP\|] | 37 [\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|] |
38 .B [\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|] | 38 [\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|] |
39 .B [\|\-\-update\|] [\|\-\-no\-warn\|] | 39 [\|\-\-update\|] [\|\-\-no\-warn\|] |
40 .B [\|\-\-help\|] [\|\-\-version\|] | 40 [\|\-\-help\|] [\|\-\-version\|] |
41 \fIfile\fP .\|.\|. | 41 \fIfile\fP .\|.\|. |
42 .ad b | 42 .ad b |
43 .hy 1 | 43 .hy 1 |
44 .SH DESCRIPTION | 44 .SH DESCRIPTION |
45 The `\|\fBetags\fP\|' program is used to create a tag table file, in a format | 45 The \|\fBetags\fP\| program is used to create a tag table file, in a format |
46 understood by | 46 understood by |
47 .BR emacs ( 1 )\c | 47 .BR emacs ( 1 )\c |
48 \&; the `\|\fBctags\fP\|' program is used to create a similar table in a | 48 \&; the \|\fBctags\fP\| program is used to create a similar table in a |
49 format understood by | 49 format understood by |
50 .BR vi ( 1 )\c | 50 .BR vi ( 1 )\c |
51 \&. Both forms of the program understand the syntax of C, Objective C, | 51 \&. Both forms of the program understand |
52 C++, Java, Fortran, Ada, Cobol, Erlang, LaTeX, Emacs Lisp/Common Lisp, | 52 the syntax of C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang, HTML, |
53 makefiles, Pascal, Perl, Postscript, Python, Prolog, Scheme and most | 53 LaTeX, Emacs Lisp/Common Lisp, Lua, makefile, Pascal, Perl, PHP, Postscript, |
54 assembler\-like syntaxes. | 54 Python, Prolog, Scheme and |
55 most assembler\-like syntaxes. | |
55 Both forms read the files specified on the command line, and write a tag | 56 Both forms read the files specified on the command line, and write a tag |
56 table (defaults: `\|TAGS\|' for \fBetags\fP, `\|tags\|' for | 57 table (defaults: \fBTAGS\fP for \fBetags\fP, \fBtags\fP for |
57 \fBctags\fP) in the current working directory. | 58 \fBctags\fP) in the current working directory. |
58 Files specified with relative file names will be recorded in the tag | 59 Files specified with relative file names will be recorded in the tag |
59 table with file names relative to the directory where the tag table | 60 table with file names relative to the directory where the tag table |
60 resides. Files specified with absolute file names will be recorded | 61 resides. If the tag table is in /dev, however, the file names are made |
61 with absolute file names. | 62 relative to the working directory. Files specified with absolute file |
63 names will be recorded | |
64 with absolute file names. Files generated from a source file\-\-like | |
65 a C file generated from a source Cweb file\-\-will be recorded with | |
66 the name of the source file. | |
62 The programs recognize the language used in an input file based on its | 67 The programs recognize the language used in an input file based on its |
63 file name and contents. The --language switch can be used to force | 68 file name and contents. The \fB\-\-language\fP switch can be used to force |
64 parsing of the file names following the switch according to the given | 69 parsing of the file names following the switch according to the given |
65 language, overriding guesses based on filename extensions. | 70 language, overriding guesses based on filename extensions. |
66 .SH OPTIONS | 71 .SH OPTIONS |
67 Some options make sense only for the \fBvi\fP style tag files produced | 72 Some options make sense only for the \fBvi\fP style tag files produced |
68 by ctags; | 73 by ctags; |
69 \fBetags\fP does not recognize them. | 74 \fBetags\fP does not recognize them. |
70 The programs accept unambiguous abbreviations for long option names. | 75 The programs accept unambiguous abbreviations for long option names. |
71 .TP | 76 .TP |
72 .B \-a, \-\-append | 77 .B \-a, \-\-append |
73 Append to existing tag file. (For vi-format tag files, see also | 78 Append to existing tag file. (For \fBvi\fP-format tag files, see also |
74 \fB\-\-update\fP.) | 79 \fB\-\-update\fP.) |
75 .TP | 80 .TP |
76 .B \-B, \-\-backward\-search | 81 .B \-B, \-\-backward\-search |
77 Tag files written in the format expected by \fBvi\fP contain regular | 82 Tag files written in the format expected by \fBvi\fP contain regular |
78 expression search instructions; the \fB\-B\fP option writes them using | 83 expression search instructions; the \fB\-B\fP option writes them using |
132 Do not tag member variables. This is the default behavior. | 137 Do not tag member variables. This is the default behavior. |
133 .TP | 138 .TP |
134 .B \-\-packages\-only | 139 .B \-\-packages\-only |
135 Only tag packages in Ada files. | 140 Only tag packages in Ada files. |
136 .TP | 141 .TP |
142 \fB\-\-parse\-stdin=\fIfile\fP | |
143 May be used (only once) in place of a file name on the command line. | |
144 \fBetags\fP will read from standard input and mark the produced tags | |
145 as belonging to the file \fBFILE\fP. | |
146 .TP | |
137 \fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP | 147 \fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP |
138 Explicit name of file for tag table; overrides default `\|TAGS\|' or | 148 Explicit name of file for tag table; overrides default \fBTAGS\fP or |
139 `\|tags\|'. (But ignored with \fB\-v\fP or \fB\-x\fP.) | 149 \fBtags\fP. (But ignored with \fB\-v\fP or \fB\-x\fP.) |
140 .TP | 150 .TP |
141 \fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP, \fB\-\-ignore\-case\-regex=\fIregexp\fP | 151 \fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP |
142 Make tags based on regexp matching for each line of the files following | 152 |
143 this option, in addition to the tags made with the standard parsing based | 153 Make tags based on regexp matching for the files following this option, |
144 on language. When using \-\-regex, case is significant, while it is not | 154 in addition to the tags made with the standard parsing based on |
145 with \-\-ignore\-case\-regex. May be freely intermixed with filenames and | 155 language. May be freely intermixed with filenames and the \fB\-R\fP |
146 the \fB\-R\fP option. The regexps are cumulative, i.e. each option will | 156 option. The regexps are cumulative, i.e. each such option will add to |
147 add to the previous ones. The regexps are of the form: | 157 the previous ones. The regexps are of one of the forms: |
148 .br | 158 .br |
149 \fB/\fP\fItagregexp\fP[\fB/\fP\fInameregexp\fP]\fB/\fP | 159 [\fB{\fP\fIlanguage\fP\fB}\fP]\fB/\fP\fItagregexp/\fP[\fInameregexp\fP\fB/\fP]\fImodifiers\fP |
150 .br | 160 .br |
151 | 161 \fB@\fP\fIregexfile\fP |
152 where \fItagregexp\fP is used to match the lines that must be tagged. | 162 .br |
153 It should not match useless characters. If the match is | 163 |
154 such that more characters than needed are unavoidably matched by | 164 where \fItagregexp\fP is used to match the tag. It should not match |
155 \fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to | 165 useless characters. If the match is such that more characters than |
156 narrow down the tag scope. \fBctags\fP ignores regexps without a | 166 needed are unavoidably matched by \fItagregexp\fP, it may be useful to |
157 \fInameregexp\fP. The syntax of regexps is the same as in emacs, | 167 add a \fInameregexp\fP, to narrow down the tag scope. \fBctags\fP |
158 augmented with intervals of the form \\{m,n\\}, as in ed or grep. | 168 ignores regexps without a \fInameregexp\fP. The syntax of regexps is |
169 the same as in emacs. The following character escape sequences are | |
170 supported: \\a, \\b, \\d, \\e, \\f, \\n, \\r, \\t, \\v, which | |
171 respectively stand for the ASCII characters BEL, BS, DEL, ESC, FF, NL, | |
172 CR, TAB, VT. | |
173 .br | |
174 The \fImodifiers\fP are a sequence of 0 or more characters among | |
175 \fIi\fP, which means to ignore case when matching; \fIm\fP, which means | |
176 that the \fItagregexp\fP will be matched against the whole file contents | |
177 at once, rather than line by line, and the matching sequence can match | |
178 multiple lines; and \fIs\fP, which implies \fIm\fP and means that the | |
179 dot character in \fItagregexp\fP matches the newline char as well. | |
180 .br | |
181 The separator, which is \fB/\fP in the examples, can be any character | |
182 different from space, tab, braces and \fB@\fP. If the separator | |
183 character is needed inside the regular expression, it must be quoted | |
184 by preceding it with \fB\\\fP. | |
185 .br | |
186 The optional \fB{\fP\fIlanguage\fP\fB}\fP prefix means that the tag | |
187 should be | |
188 created only for files of language \fIlanguage\fP, and ignored | |
189 otherwise. This is particularly useful when storing many predefined | |
190 regexps in a file. | |
191 .br | |
192 In its second form, \fIregexfile\fP is the name of a file that contains | |
193 a number of arguments to the \fI\-\-regex\=\fP option, | |
194 one per line. Lines beginning with a space or tab are assumed | |
195 to be comments, and ignored. | |
196 | |
159 .br | 197 .br |
160 Here are some examples. All the regexps are quoted to protect them | 198 Here are some examples. All the regexps are quoted to protect them |
161 from shell interpretation. | 199 from shell interpretation. |
162 .br | 200 .br |
163 | 201 |
164 Tag the DEFVAR macros in the emacs source files: | 202 Tag the DEFVAR macros in the emacs source files: |
165 .br | 203 .br |
166 \fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"\/'\fP | 204 \fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"\/'\fP |
205 .\"" This comment is to avoid confusion to Emacs syntax highlighting | |
167 .br | 206 .br |
168 | 207 |
169 Tag VHDL files (this example is a single long line, broken here for | 208 Tag VHDL files (this example is a single long line, broken here for |
170 formatting reasons): | 209 formatting reasons): |
171 .br | 210 .br |
178 Tag TCL files (this last example shows the usage of a \fItagregexp\fP): | 217 Tag TCL files (this last example shows the usage of a \fItagregexp\fP): |
179 .br | 218 .br |
180 \fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP | 219 \fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP |
181 | 220 |
182 .br | 221 .br |
183 A regexp can be preceded by {lang}, thus restriciting it to match lines of | 222 A regexp can be preceded by {\fIlang\fP}, thus restricting it to match |
184 files of the specified language. Use \fBetags --help\fP to obtain a list | 223 lines of files of the specified language. Use \fBetags --help\fP to obtain |
185 of the recognised languages. This feature is particularly useful inside | 224 a list of the recognised languages. This feature is particularly useful inside |
186 \fBregex files\fP. A regex file contains one regex per line. Empty lines, | 225 \fBregex files\fP. A regex file contains one regex per line. Empty lines, |
187 and those lines beginning with space or tab are ignored. Lines beginning | 226 and those lines beginning with space or tab are ignored. Lines beginning |
188 with @ are references to regex files whose name follows the @ sign. Other | 227 with @ are references to regex files whose name follows the @ sign. Other |
189 lines are considered regular expressions like those following \-\-regex. | 228 lines are considered regular expressions like those following \fB\-\-regex\fP. |
190 .br | 229 .br |
191 For example, the command | 230 For example, the command |
192 .br | 231 .br |
193 etags \-\-regex=@regex.file *.c | 232 \fIetags \-\-regex=@regex.file *.c\fP |
194 .br | 233 .br |
195 reads the regexes contained in the file regex.file. | 234 reads the regexes contained in the file regex.file. |
196 .TP | 235 .TP |
197 .B \-R, \-\-no\-regex | 236 .B \-R, \-\-no\-regex |
198 Don't do any more regexp matching on the following files. May be | 237 Don't do any more regexp matching on the following files. May be |
199 freely intermixed with filenames and the \fB\-\-regex\fP option. | 238 freely intermixed with filenames and the \fB\-\-regex\fP option. |
200 .TP | 239 .TP |
201 .B \-t, \-\-typedefs | 240 .B \-t, \-\-typedefs |
202 Record typedefs in C code as tags. Since this is the default behaviour | 241 Record typedefs in C code as tags. Since this is the default behavior |
203 of \fBetags\fP, only \fBctags\fP accepts this option. | 242 of \fBetags\fP, only \fBctags\fP accepts this option. |
204 .TP | 243 .TP |
205 .B \-T, \-\-typedefs\-and\-c++ | 244 .B \-T, \-\-typedefs\-and\-c++ |
206 Generate tag entries for typedefs, struct, enum, and union tags, and | 245 Generate tag entries for typedefs, struct, enum, and union tags, and |
207 C++ member functions. Since this is the default behaviour | 246 C++ member functions. Since this is the default behavior |
208 of \fBetags\fP, only \fBctags\fP accepts this option. | 247 of \fBetags\fP, only \fBctags\fP accepts this option. |
209 .TP | 248 .TP |
210 .B \-u, \-\-update | 249 .B \-u, \-\-update |
211 Update tag entries for \fIfiles\fP specified on command line, leaving | 250 Update tag entries for \fIfiles\fP specified on command line, leaving |
212 tag entries for other files in place. Currently, this is implemented | 251 tag entries for other files in place. Currently, this is implemented |
227 .B \-x, \-\-cxref | 266 .B \-x, \-\-cxref |
228 Instead of generating a tag file, write a cross reference (in | 267 Instead of generating a tag file, write a cross reference (in |
229 \fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option. | 268 \fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option. |
230 .TP | 269 .TP |
231 .B \-h, \-H, \-\-help | 270 .B \-h, \-H, \-\-help |
232 Print usage information. | 271 Print usage information. Followed by one or more \-\-language=LANG |
272 prints detailed information about how tags are created for LANG. | |
233 .TP | 273 .TP |
234 .B \-V, \-\-version | 274 .B \-V, \-\-version |
235 Print the current version of the program (same as the version of the | 275 Print the current version of the program (same as the version of the |
236 emacs \fBetags\fP is shipped with). | 276 emacs \fBetags\fP is shipped with). |
237 | 277 |
243 .BR emacs ( 1 ), | 283 .BR emacs ( 1 ), |
244 .BR vgrind ( 1 ), | 284 .BR vgrind ( 1 ), |
245 .BR vi ( 1 ). | 285 .BR vi ( 1 ). |
246 | 286 |
247 .SH COPYING | 287 .SH COPYING |
248 Copyright (c) 1999 Free Software Foundation, Inc. | 288 Copyright |
289 .if t \(co | |
290 .if n (c) | |
291 1999, 2001 Free Software Foundation, Inc. | |
249 .PP | 292 .PP |
250 Permission is granted to make and distribute verbatim copies of | 293 Permission is granted to make and distribute verbatim copies of this |
251 this manual provided the copyright notice and this permission notice | 294 document provided the copyright notice and this permission notice are |
252 are preserved on all copies. | 295 preserved on all copies. |
253 .PP | 296 .PP |
254 Permission is granted to copy and distribute modified versions of this | 297 Permission is granted to copy and distribute modified versions of |
255 manual under the conditions for verbatim copying, provided that the | 298 this document under the conditions for verbatim copying, provided that |
256 entire resulting derived work is distributed under the terms of a | 299 the entire resulting derived work is distributed under the terms of |
257 permission notice identical to this one. | 300 a permission notice identical to this one. |
258 .PP | 301 .PP |
259 Permission is granted to copy and distribute translations of this | 302 Permission is granted to copy and distribute translations of this |
260 manual into another language, under the above conditions for modified | 303 document into another language, under the above conditions for |
261 versions, except that this permission notice may be included in | 304 modified versions, except that this permission notice may be stated |
262 translations approved by the Free Software Foundation instead of in | 305 in a translation approved by the Free Software Foundation. |
263 the original English. | 306 |
307 .\" arch-tag: 9534977f-af78-42f0-991d-1df6b6c05573 |