.TH tags 3erl "tools 3.5.3" "Ericsson AB" "Erlang Module Definition" .SH NAME tags \- Generate Emacs TAGS file from Erlang source files .SH DESCRIPTION .LP A \fITAGS\fR\& file is used by Emacs to find function and variable definitions in any source file in large projects\&. This module can generate a \fITAGS\fR\& file from Erlang source files\&. It recognises functions, records, and macro definitions\&. .SH EXPORTS .LP .nf .B file(File) -> ok | error .br .fi .br .nf .B file(File, Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 File = file:filename() .br Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Create a \fITAGS\fR\& file for the file \fIFile\fR\&\&. .RE .LP .nf .B files(FileList) -> ok | error .br .fi .br .nf .B files(FileList, Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 FileList = [file:filename()] .br Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Create a TAGS file for the files in the list \fIFileList\fR\&\&. .RE .LP .nf .B dir(Dir) -> ok | error .br .fi .br .nf .B dir(Dir, Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 Dir = file:filename() .br Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Create a TAGS file for all files in directory \fIDir\fR\&\&. .RE .LP .nf .B dirs(DirList) -> ok | error .br .fi .br .nf .B dirs(DirList, Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 DirList = [file:filename()] .br Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Create a TAGS file for all files in any directory in \fIDirList\fR\&\&. .RE .LP .nf .B subdir(Dir) -> ok | error .br .fi .br .nf .B subdir(Dir, Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 Dir = file:filename() .br Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Descend recursively down the directory \fIDir\fR\& and create a \fITAGS\fR\& file based on all files found\&. .RE .LP .nf .B subdirs(DirList) -> ok | error .br .fi .br .nf .B subdirs(DirList, Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 DirList = [file:filename()] .br Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Descend recursively down all the directories in \fIDirList\fR\& and create a \fITAGS\fR\& file based on all files found\&. .RE .LP .nf .B root() -> ok | error .br .fi .br .nf .B root(Options) -> ok | error .br .fi .br .RS .LP Types: .RS 3 Options = [option()] .br .nf \fBoption()\fR\& = .br {outfile, NameOfTAGSFile :: file:filename()} | .br {outdir, NameOfDirectory :: file:filename()} .fi .br .RE .RE .RS .LP Create a \fITAGS\fR\& file covering all files in the Erlang distribution\&. .RE .SH "OPTIONS" .LP The functions above have an optional argument, \fIOptions\fR\&\&. It is a list which can contain the following elements: .RS 2 .TP 2 * \fI{outfile, NameOfTAGSFile}\fR\& Create a \fITAGS\fR\& file named \fINameOfTAGSFile\fR\&\&. .LP .TP 2 * \fI{outdir, NameOfDirectory}\fR\& Create a file named \fITAGS\fR\& in the directory \fINameOfDirectory\fR\&\&. .LP .RE .LP The default behaviour is to create a file named \fITAGS\fR\& in the current directory\&. .SH "EXAMPLES" .RS 2 .TP 2 * \fItags:root([{outfile, "root\&.TAGS"}])\&.\fR\& .br .RS 2 .LP This command will create a file named \fIroot\&.TAGS\fR\& in the current directory\&. The file will contain references to all Erlang source files in the Erlang distribution\&. .RE .LP .TP 2 * \fItags:files(["foo\&.erl", "bar\&.erl", "baz\&.erl"], [{outdir, "\&.\&./projectdir"}])\&. \fR\& .br .RS 2 .LP Here we create file named \fITAGS\fR\& placed it in the directory \fI\&.\&./projectdir\fR\&\&. The file contains information about the functions, records, and macro definitions of the three files\&. .RE .LP .RE .SH "SEE ALSO" .RS 2 .TP 2 * Richard M\&. Stallman\&. GNU Emacs Manual, chapter "Editing Programs", section "Tag Tables"\&. Free Software Foundation, 1995\&. .LP .TP 2 * Anders Lindgren\&. The Erlang editing mode for Emacs\&. Ericsson, 1998\&. .LP .RE