aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorFrancesco Potortì1999-11-01 19:04:46 +0000
committerFrancesco Potortì1999-11-01 19:04:46 +0000
commit8dc78b523c00e3718da9a4ef028c9f2e6ccfc827 (patch)
treec8387742aee16037beafe120dd4868d23b7d0e8a /etc
parent4a80fa0ccb4b1a5714d19608275b588ebab6c01a (diff)
downloademacs-8dc78b523c00e3718da9a4ef028c9f2e6ccfc827.tar.gz
emacs-8dc78b523c00e3718da9a4ef028c9f2e6ccfc827.zip
Last changes for etags (I hope).
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS11
-rw-r--r--etc/etags.1113
2 files changed, 76 insertions, 48 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 0c30b07658a..cea0444e1c8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -387,10 +387,10 @@ sh-script can attempt to "learn" the current buffer's style.
387*** In DOS, etags looks for file.cgz if it cannot find file.c. 387*** In DOS, etags looks for file.cgz if it cannot find file.c.
388 388
389*** New option --ignore-case-regex is an alternative to --regex. It is now 389*** New option --ignore-case-regex is an alternative to --regex. It is now
390 possible to bind a regexp to a language, by prepending the regexp with 390possible to bind a regexp to a language, by prepending the regexp with
391 {lang}, where lang is one of the languages that `etags --help' prints 391{lang}, where lang is one of the languages that `etags --help' prints out.
392 out. This feature is useful especially for regex files, where each 392This feature is useful especially for regex files, where each line contains
393 line contains a regular expression. The manual contains details. 393a regular expression. The manual contains details.
394 394
395*** In C and derived languages, etags creates tags for function 395*** In C and derived languages, etags creates tags for function
396declarations when given the --declarations option. 396declarations when given the --declarations option.
@@ -413,7 +413,8 @@ variables are tagged.
413 413
414*** New language Python: def and class at the beginning of a line are tags. 414*** New language Python: def and class at the beginning of a line are tags.
415 415
416*** .ss files are Scheme files. 416*** .ss files are Scheme files, .pdb is Postscript with C syntax, .psw is
417for PSWrap.
417 418
418** Emacs now attempts to determine the initial language environment 419** Emacs now attempts to determine the initial language environment
419and preferred and locale coding systems systematically from the 420and preferred and locale coding systems systematically from the
diff --git a/etc/etags.1 b/etc/etags.1
index 20febe24c2f..20d2a10b44f 100644
--- a/etc/etags.1
+++ b/etc/etags.1
@@ -1,6 +1,6 @@
1.\" Copyright (c) 1992 Free Software Foundation 1.\" Copyright (c) 1992 Free Software Foundation
2.\" See section COPYING for conditions for redistribution 2.\" See section COPYING for conditions for redistribution
3.TH etags 1 "19apr1994" "GNU Tools" "GNU Tools" 3.TH etags 1 "02nov1999" "GNU Tools" "GNU Tools"
4.de BP 4.de BP
5.sp 5.sp
6.ti -.2i 6.ti -.2i
@@ -12,24 +12,31 @@ 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 [\|\-aCDRSVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] [\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|] 15.B etags [\|\-aCDGImRVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|]
16.br 16.if n .br
17[\|\-\-c++\|] [\|\-\-no\-defines\|] [\|\-\-ignore\-indentation\|] 17.B [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
18[\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|] 18.br
19[\|\-\-no\-regexp\|] [\|\-\-help\|] [\|\-\-version\|] 19[\|\-\-append\|] [\|\-\-c++\|] [\|\-\-no\-defines\|]
20[\|\-\-include=\fIfile\fP\|] [\|\-\-output=\fItagfile\fP\|] 20[\|\-\-no\-globals\|] [\|\-\-include=\fIfile\fP\|]
21[\|\-\-append\|] \fIfile\fP .\|.\|. 21[\|\-\-ignore\-indentation\|] [\|\-\-language=\fIlanguage\fP\|]
22[\|\-\-members\|] [\|\-\-output=\fItagfile\fP\|]
23[\|\-\-regex=\fIregexp\fP\|] [\|\-\-no\-regex\|]
24[\|\-\-help\|] [\|\-\-version\|]
25\fIfile\fP .\|.\|.
22 26
23.B ctags [\|\-aCdRSVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|] 27.B ctags [\|\-aCdgImRVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
24.br 28.if n .br
25[\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|] 29.B [\|\-o \fItagfile\fP\|] [\|\-r \fIregexp\fP\|]
26[\|\-\-c++\|] [\|\-\-defines\|] [\|\-\-ignore\-indentation\|] 30.br
27[\|\-\-no\-warn\|] [\|\-\-cxref\|] [\|\-\-backward\-search\|] 31[\|\-\-append\|] [\|\-\-backward\-search\|] [\|\-\-c++\|]
28[\|\-\-forward\-search\|] [\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|] 32[\|\-\-cxref\|] [\|\-\-defines\|] [\|\-\-forward\-search\|]
29[\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|] 33[\|\-\-globals\|] [\|\-\-ignore\-indentation\|]
34[\|\-\-language=\fIlanguage\fP\|] [\|\-\-members\|]
35[\|\-\-output=\fItagfile\fP\|] [\|\-\-regex=\fIregexp\fP\|]
36[\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|]
37[\|\-\-update\|] [\|\-\-no\-warn\|]
30[\|\-\-help\|] [\|\-\-version\|] 38[\|\-\-help\|] [\|\-\-version\|]
31.br 39\fIfile\fP .\|.\|.
32[\|\-\-output=\fItagfile\fP\|] [\|\-\-append\|] [\|\-\-update\|] \fIfile\fP .\|.\|.
33.ad b 40.ad b
34.hy 1 41.hy 1
35.SH DESCRIPTION 42.SH DESCRIPTION
@@ -40,8 +47,9 @@ understood by
40format understood by 47format understood by
41.BR vi ( 1 )\c 48.BR vi ( 1 )\c
42\&. Both forms of the program understand 49\&. Both forms of the program understand
43the syntax of C, C++, Fortran, Pascal, LaTeX, Scheme, 50the syntax of C, Objective C, C++, Java, Fortran, Pascal, Cobol, Ada, Perl,
44Emacs Lisp/Common Lisp, Erlang, Prolog and most assembler\-like syntaxes. 51LaTeX, Scheme, Emacs Lisp/Common Lisp, Postscript, Erlang, Python, Prolog and
52most assembler\-like syntaxes.
45Both forms read the files specified on the command line, and write a tag 53Both forms read the files specified on the command line, and write a tag
46table (defaults: `\|TAGS\|' for \fBetags\fP, `\|tags\|' for 54table (defaults: `\|TAGS\|' for \fBetags\fP, `\|tags\|' for
47\fBctags\fP) in the current working directory. 55\fBctags\fP) in the current working directory.
@@ -76,16 +84,39 @@ Treat files with `\|.c\|' and `\|.h\|' extensions as C++ code, not C
76code. Files with `\|.C\|', `\|.H\|', `\|.cxx\|', `\|.hxx\|', or 84code. Files with `\|.C\|', `\|.H\|', `\|.cxx\|', `\|.hxx\|', or
77`\|.cc\|' extensions are always assumed to be C++ code. 85`\|.cc\|' extensions are always assumed to be C++ code.
78.TP 86.TP
87.B \-\-declarations
88In C and derived languages, create tags for function declarations,
89and create tags for extern variables unless \-\-no\-globals is used.
90.TP
79.B \-d, \-\-defines 91.B \-d, \-\-defines
80Create tag entries for C preprocessor definitions, too. This is the 92Create tag entries for C preprocessor constant definitions
81default behavior for \fBetags\fP, so this option is only accepted 93and enum constants, too. This is the
82by \fBctags\fP. 94default behavior for \fBetags\fP.
83.TP 95.TP
84.B \-D, \-\-no\-defines 96.B \-D, \-\-no\-defines
85Do not create tag entries for C preprocessor definitions. 97Do not create tag entries for C preprocessor constant definitions
98and enum constants.
86This may make the tags file much smaller if many header files are tagged. 99This may make the tags file much smaller if many header files are tagged.
87This is the default behavior for \fBctags\fP, so this option is only 100This is the default behavior for \fBctags\fP.
88accepted by \fBetags\fP. 101.TP
102.B \-g, \-\-globals
103Create tag entries for global variables in C, C++, Objective C, Java,
104and Perl.
105This is the default behavior for \fBetags\fP.
106.TP
107.B \-G, \-\-no\-globals
108Do not tag global variables. Typically this reduces the file size by
109one fourth. This is the default behavior for \fBctags\fP.
110.TP
111\fB\-i\fP \fIfile\fP, \fB\-\-include=\fIfile\fP
112Include a note in the tag file indicating that, when searching for a
113tag, one should also consult the tags file \fIfile\fP after checking the
114current file. This options is only accepted by \fBetags\fP.
115.TP
116.B \-I, \-\-ignore\-indentation
117Don't rely on indentation as much as we normally do. Currently, this
118means not to assume that a closing brace in the first column is the
119final brace of a function or structure definition in C and C++.
89.TP 120.TP
90\fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP 121\fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP
91Parse the following files according to the given language. More than 122Parse the following files according to the given language. More than
@@ -96,6 +127,16 @@ detection of language based on filename extension. The `none'
96language may be used to disable language parsing altogether; only 127language may be used to disable language parsing altogether; only
97regexp matching is done in this case (see the \fB\-\-regex\fP option). 128regexp matching is done in this case (see the \fB\-\-regex\fP option).
98.TP 129.TP
130.B \-m, \-\-members
131Create tag entries for variables that are members of structure-like
132constructs in C++, Objective C, Java.
133.TP
134.B \-M, \-\-no\-members
135Do not tag member variables. This is the default behavior.
136.TP
137.B \-\-packages\-only
138Only tag packages in Ada files.
139.TP
99\fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP 140\fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP
100Explicit name of file for tag table; overrides default `\|TAGS\|' or 141Explicit name of file for tag table; overrides default `\|TAGS\|' or
101`\|tags\|'. (But ignored with \fB\-v\fP or \fB\-x\fP.) 142`\|tags\|'. (But ignored with \fB\-v\fP or \fB\-x\fP.)
@@ -116,7 +157,8 @@ It should not match useless characters. If the match is
116such that more characters than needed are unavoidably matched by 157such that more characters than needed are unavoidably matched by
117\fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to 158\fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to
118narrow down the tag scope. \fBctags\fP ignores regexps without a 159narrow down the tag scope. \fBctags\fP ignores regexps without a
119\fInameregexp\fP. 160\fInameregexp\fP. The syntax of regexps is the same as in emacs,
161augmented with intervals of the form \\{m,n\\}, as in ed or grep.
120.br 162.br
121Here are some examples. All the regexps are quoted to protect them 163Here are some examples. All the regexps are quoted to protect them
122from shell interpretation. 164from shell interpretation.
@@ -136,16 +178,6 @@ CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex\='/[\ \\t]*\\
136\\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP 178\\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP
137.br 179.br
138 180
139Tag Cobol files:
140.br
141\fI\-\-language\=none \-\-regex\='/.......[a\-zA\-Z0\-9\-]+\\./'\fP
142.br
143
144Tag Postscript files:
145.br
146\fI\-\-language\=none \-\-regex\='#/[^\ \\t{]+#/'\fP
147.br
148
149Tag TCL files (this last example shows the usage of a \fItagregexp\fP): 181Tag TCL files (this last example shows the usage of a \fItagregexp\fP):
150.br 182.br
151\fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP 183\fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
@@ -155,11 +187,6 @@ Tag TCL files (this last example shows the usage of a \fItagregexp\fP):
155Don't do any more regexp matching on the following files. May be 187Don't do any more regexp matching on the following files. May be
156freely intermixed with filenames and the \fB\-\-regex\fP option. 188freely intermixed with filenames and the \fB\-\-regex\fP option.
157.TP 189.TP
158.B \-S, \-\-ignore\-indentation
159Don't rely on indentation as much as we normally do. Currently, this
160means not to assume that a closing brace in the first column is the
161final brace of a function or structure definition in C and C++.
162.TP
163.B \-t, \-\-typedefs 190.B \-t, \-\-typedefs
164Record typedefs in C code as tags. Since this is the default behaviour 191Record typedefs in C code as tags. Since this is the default behaviour
165of \fBetags\fP, only \fBctags\fP accepts this option. 192of \fBetags\fP, only \fBctags\fP accepts this option.
@@ -190,7 +217,7 @@ allowed with it.
190Instead of generating a tag file, write a cross reference (in 217Instead of generating a tag file, write a cross reference (in
191\fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option. 218\fBcxref\fP format) to standard output. Only \fBctags\fP accepts this option.
192.TP 219.TP
193.B \-H, \-\-help 220.B \-h, \-H, \-\-help
194Print usage information. 221Print usage information.
195.TP 222.TP
196.B \-V, \-\-version 223.B \-V, \-\-version
@@ -207,7 +234,7 @@ Stallman.
207.BR vi ( 1 ). 234.BR vi ( 1 ).
208 235
209.SH COPYING 236.SH COPYING
210Copyright (c) 1992 Free Software Foundation, Inc. 237Copyright (c) 1999 Free Software Foundation, Inc.
211.PP 238.PP
212Permission is granted to make and distribute verbatim copies of 239Permission is granted to make and distribute verbatim copies of
213this manual provided the copyright notice and this permission notice 240this manual provided the copyright notice and this permission notice