aboutsummaryrefslogtreecommitdiffstats
path: root/man/programs.texi
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 /man/programs.texi
parent4a80fa0ccb4b1a5714d19608275b588ebab6c01a (diff)
downloademacs-8dc78b523c00e3718da9a4ef028c9f2e6ccfc827.tar.gz
emacs-8dc78b523c00e3718da9a4ef028c9f2e6ccfc827.zip
Last changes for etags (I hope).
Diffstat (limited to 'man/programs.texi')
-rw-r--r--man/programs.texi51
1 files changed, 34 insertions, 17 deletions
diff --git a/man/programs.texi b/man/programs.texi
index 68057d81a25..e2f6badbafc 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -1620,13 +1620,13 @@ recorded is called a @dfn{tag}.
1620@item 1620@item
1621In C code, any C function or typedef is a tag, and so are definitions of 1621In C code, any C function or typedef is a tag, and so are definitions of
1622@code{struct}, @code{union} and @code{enum}. You can tag function 1622@code{struct}, @code{union} and @code{enum}. You can tag function
1623declarations in addition to function definitions by giving the 1623declarations and external variables in addition to function definitions
1624@samp{--declarations} option to @code{etags}. @code{#define} macro 1624by giving the @samp{--declarations} option to @code{etags}.
1625definitions and @code{enum} constants are also tags, unless you specify 1625@code{#define} macro definitions and @code{enum} constants are also
1626@samp{--no-defines} when making the tags table. Similarly, global 1626tags, unless you specify @samp{--no-defines} when making the tags table.
1627variables are tags, unless you specify @samp{--no-globals}. Use of 1627Similarly, global variables are tags, unless you specify
1628@samp{--no-globals} and @samp{--no-defines} can make the tags table file 1628@samp{--no-globals}. Use of @samp{--no-globals} and @samp{--no-defines}
1629much smaller. 1629can make the tags table file much smaller.
1630 1630
1631@item 1631@item
1632In C++ code, in addition to all the tag constructs of C code, member 1632In C++ code, in addition to all the tag constructs of C code, member
@@ -1680,7 +1680,9 @@ set with @code{set!} at top level in the file.
1680@itemize @bullet 1680@itemize @bullet
1681 1681
1682@item 1682@item
1683In Ada code, functions, procedures, packages, tasks, and types are tags. 1683In Ada code, functions, procedures, packages, tasks, and types are
1684tags. Use the @samp{--packages-only} option to create tags for packages
1685only.
1684 1686
1685@item 1687@item
1686In assembler code, labels appearing at the beginning of a line, 1688In assembler code, labels appearing at the beginning of a line,
@@ -1720,11 +1722,11 @@ In Postscript code, the tags are the functions.
1720 1722
1721@item 1723@item
1722In Prolog code, a tag name appears at the left margin. 1724In Prolog code, a tag name appears at the left margin.
1723@end itemize
1724 1725
1725@item 1726@item
1726In Python code, @code{def} or @code{class} at the beginning of a line 1727In Python code, @code{def} or @code{class} at the beginning of a line
1727generate a tag. 1728generate a tag.
1729@end itemize
1728 1730
1729 You can also generate tags based on regexp matching (@pxref{Using 1731 You can also generate tags based on regexp matching (@pxref{Using
1730Regexps}) to handle other formats and languages. 1732Regexps}) to handle other formats and languages.
@@ -1930,21 +1932,36 @@ from shell interpretation.
1930@itemize @bullet 1932@itemize @bullet
1931 1933
1932@item 1934@item
1933Tag VHDL files (this example is a single long line, broken here for 1935Tag Octave files:
1934formatting reasons):
1935 1936
1936@smallexample 1937@smallexample
1937--language=none 1938etags --language=none \
1938--regex='/[ \t]*\(ARCHITECTURE\|CONFIGURATION\) +[^ ]* +OF/' 1939 --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/' \
1939--regex='/[ \t]*\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\ 1940 --regex='/###key \(.*\)/\1/' \
1940\( BODY\)?\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/' 1941 --regex='/[ \t]*global[ \t].*/' \
1942 *.m
1941@end smallexample 1943@end smallexample
1942 1944
1945@noindent
1946Note that tags are not generated for scripts so that you have to add a
1947line by yourself of the form `###key <script-name>' if you want to jump
1948to it.
1949
1943@item 1950@item
1944Tag Tcl files (this last example shows the usage of a @var{nameregexp}): 1951Tag Tcl files:
1945 1952
1946@smallexample 1953@smallexample
1947--lang=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' 1954etags --language=none --regex='/proc[ \t]+\([^ \t]+\)/\1/' *.tcl
1955@end smallexample
1956
1957@item
1958Tag VHDL files:
1959
1960@smallexample
1961--language=none \
1962--regex='/[ \t]*\(ARCHITECTURE\|CONFIGURATION\) +[^ ]* +OF/' \
1963--regex='/[ \t]*\(ATTRIBUTE\|ENTITY\|FUNCTION\|PACKAGE\
1964\( BODY\)?\|PROCEDURE\|PROCESS\|TYPE\)[ \t]+\([^ \t(]+\)/\3/'
1948@end smallexample 1965@end smallexample
1949@end itemize 1966@end itemize
1950 1967