(emacs)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 several languages, as described in Note: Tag Syntax.
Here is how to run `etags':

     etags INPUTFILES...

The `etags' 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 its file name and contents;
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, the way to update the tag table is the same way
it was made in the first place.  It is not necessary to do this often.

   If the tag table fails to record a tag, or records it for the wrong
file, then Emacs cannot possibly 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 a slight delay in finding the tag.  Even if the stored
position is very wrong, Emacs will still find the tag, but it must
search the entire file for it.

   So you should update a tag table when you define new tags that you
want to have listed, or when you move tag definitions from one file to
another, or when changes become substantial.  Normally there is no need
to update the tag table after each edit, or even every day.

automatically generated by info2www