(lemacs.info)Create Tag Table
Next: Select Tag Table Prev: Tag Syntax Up: Tags
Creating Tag Tables
The `etags' program is used to create a tag table file. It knows
the syntax of C, Fortran, LaTeX, Scheme, and Emacs Lisp/Common Lisp. To
use `etags', use it as a shell command:
The program reads the specified files and writes a tag table named
`TAGS' in the current working directory. `etags' recognizes the
language used in an input file based on the name and contents of the
file; there are no switches for specifying the language. The `-t'
switch tells `etags' to record typedefs in C code as tags.
If the tag table data become outdated due to changes in the files
described in the table, you can update the tag table by running the
program from the shell again. It is not necessary to do this often.
If the tag table fails to record a tag, or records it for the wrong
file, Emacs cannot find its definition. However, if the position
recorded in the tag table becomes a little bit wrong (due to some
editing in the file that the tag definition is in), the only
consequence is to slow down finding the tag slightly. Even if the
stored position is very wrong, Emacs will still find the tag, but it
must search the entire file for it.
You should update a tag table when you define new tags you want to
have listed, when you move tag definitions from one file to another, or
when changes become substantial. You don't have to update the tag
table after each edit, or even every day.
automatically generated by info2www