1<?xml version="1.0" encoding="utf-8" ?> 2<!DOCTYPE erlref SYSTEM "erlref.dtd"> 3 4<erlref> 5 <header> 6 <copyright> 7 <year>1998</year> 8 <year>2020</year> 9 <holder>Ericsson AB, All Rights Reserved</holder> 10 </copyright> 11 <legalnotice> 12 Licensed under the Apache License, Version 2.0 (the "License"); 13 you may not use this file except in compliance with the License. 14 You may obtain a copy of the License at 15 16 http://www.apache.org/licenses/LICENSE-2.0 17 18 Unless required by applicable law or agreed to in writing, software 19 distributed under the License is distributed on an "AS IS" BASIS, 20 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 See the License for the specific language governing permissions and 22 limitations under the License. 23 24 The Initial Developer of the Original Code is Ericsson AB. 25 </legalnotice> 26 27 <title>tags</title> 28 <prepared>Anders Lindgren</prepared> 29 <responsible></responsible> 30 <docno>1</docno> 31 <date>98-03-11</date> 32 <rev>A</rev> 33 <file>tags.sgml</file> 34 </header> 35 <module since="">tags</module> 36 <modulesummary>Generate Emacs TAGS file from Erlang source files</modulesummary> 37 <description> 38 <p>A <c>TAGS</c> file is used by Emacs to find function and variable 39 definitions in any source file in large projects. This module can 40 generate a <c>TAGS</c> file from Erlang source files. It recognises 41 functions, records, and macro definitions.</p> 42 </description> 43 <funcs> 44 <func> 45 <name since="">file(File [, Options])</name> 46 <fsummary>Create a <c>TAGS</c>file for the file <c>File</c>.</fsummary> 47 <desc> 48 <p>Create a <c>TAGS</c> file for the file <c>File</c>.</p> 49 </desc> 50 </func> 51 <func> 52 <name since="">files(FileList [, Options])</name> 53 <fsummary>Create a TAGS file for the files in the list<c>FileList</c>.</fsummary> 54 <desc> 55 <p>Create a TAGS file for the files in the list 56 <c>FileList</c>.</p> 57 </desc> 58 </func> 59 <func> 60 <name since="">dir(Dir [, Options])</name> 61 <fsummary>Create a TAGS file for all files in directory<c>Dir</c>.</fsummary> 62 <desc> 63 <p>Create a TAGS file for all files in directory 64 <c>Dir</c>.</p> 65 </desc> 66 </func> 67 <func> 68 <name since="">dirs(DirList [, Options])</name> 69 <fsummary>Create a TAGS file for all files in any directory in<c>DirList</c>.</fsummary> 70 <desc> 71 <p>Create a TAGS file for all files in any directory in 72 <c>DirList</c>.</p> 73 </desc> 74 </func> 75 <func> 76 <name since="">subdir(Dir [, Options])</name> 77 <fsummary>Descend recursively down the directory <c>Dir</c>and create a <c>TAGS</c>file based on all files found.</fsummary> 78 <desc> 79 <p>Descend recursively down the directory <c>Dir</c> and 80 create a <c>TAGS</c> file based on all files found.</p> 81 </desc> 82 </func> 83 <func> 84 <name since="">subdirs(DirList [, Options])</name> 85 <fsummary>Descend recursively down all the directories in<c>DirList</c>and create a <c>TAGS</c>file based on all files found.</fsummary> 86 <desc> 87 <p>Descend recursively down all the directories in 88 <c>DirList</c> and create a <c>TAGS</c> file based on all 89 files found.</p> 90 </desc> 91 </func> 92 <func> 93 <name since="">root([Options])</name> 94 <fsummary>Create a <c>TAGS</c>file covering all files in the Erlang distribution.</fsummary> 95 <desc> 96 <p>Create a <c>TAGS</c> file covering all files in 97 the Erlang distribution.</p> 98 </desc> 99 </func> 100 </funcs> 101 102 <section> 103 <title>OPTIONS</title> 104 <p>The functions above have an optional argument, <c>Options</c>. It is a 105 list which can contain the following elements:</p> 106 <list type="bulleted"> 107 <item><c>{outfile, NameOfTAGSFile}</c> Create a <c>TAGS</c> file named 108 <c>NameOfTAGSFile</c>. 109 </item> 110 <item><c>{outdir, NameOfDirectory}</c> Create a file named 111 <c>TAGS</c> in the directory <c>NameOfDirectory</c>.</item> 112 </list> 113 <p>The default behaviour is to create a file named <c>TAGS</c> in the current 114 directory.</p> 115 </section> 116 117 <section> 118 <title>Examples</title> 119 <list type="bulleted"> 120 <item> 121 <p><c>tags:root([{outfile, "root.TAGS"}]).</c> <br></br> 122</p> 123 <p>This command will create a file named <c>root.TAGS</c> in the current 124 directory. The file will contain references to all Erlang source 125 files in the Erlang distribution.</p> 126 </item> 127 <item> 128 <p><c>tags:files(["foo.erl", "bar.erl", "baz.erl"], [{outdir, "../projectdir"}]). </c> <br></br> 129</p> 130 <p>Here we create file named <c>TAGS</c> placed it in the directory 131 <c>../projectdir</c>. The file contains information about the 132 functions, records, and macro definitions of the three files.</p> 133 </item> 134 </list> 135 </section> 136 137 <section> 138 <title>SEE ALSO</title> 139 <list type="bulleted"> 140 <item>Richard M. Stallman. GNU Emacs Manual, chapter "Editing Programs", 141 section "Tag Tables". Free Software Foundation, 1995. 142 </item> 143 <item>Anders Lindgren. The Erlang editing mode for Emacs. Ericsson, 144 1998.</item> 145 </list> 146 </section> 147</erlref> 148 149