[Download postscript version]
next up previous
Next: Writing Keyboard Macros Up: Emacs Previous: Cutting and Pasting Text

Etags

   Etags is a stand-alone Unix program which creates an index database of functions and other identifiers out of the specified C/C++ source files. Emacs reads this file and uses the information for the etags commands. These functions are very useful for a programmer. One of the features they allow is to jump to the beginning of the code of a specified function.

To generate the etags database file, you need to be in the directory containing your c-files. For example, typing etags *.[ch] in your shell will create the file TAGS, containing the references to all C-functions and definitions.

Table 6 describes some of the possible commands.

 

Etags
Key Action Explanation
M-. find tag Jumps to the location where the function or constant is defined. Emacs opens the file containing the function automatically, if it is not yet open.
M-TAB Expand tag Any function name that is indexed by a tag file (explained in subsection 2.4), can be expanded to its full name. If the expansion is ambiguous, the variants are displayed in a separate buffer. This feature can also be very useful, if we are not sure about the function name.
Table 6:  



Adrian Perrig
Wed Jun 12 00:18:25 MET DST 1996