generate-tags-file - Generate a tags file
n generate-tags-file [ "tag-command" ]
The generate-tags-file command provides an interface to tag file generation. Typically the "tag-command" argument will not be required as the current buffer will automatically configure generate-tags-file on how tags are generated for the current buffer's file type. See the notes below for more information on configuration.
generate-tags-file supports two different methods of tag generation, firstly via a MicroEmacs macro file and secondly by an external shell command (such as ctags(1)). It is generally configured in the current buffer's setup hook.
If a macro file is used a setup dialog is opened if an argument of 0 is given to generate-tags. This dialog can be used to configure which type of tags are required and the starting directory (useful when using recursive tags over a source tree). Note that not all tag types are available for all file types.
The generated tags file can then be used by the find-tag(2) command.
generate-tags-file is a macro defined in file gentags.emf.
generate-tags-file can be configured in one of 2 ways:
When a MicroEmacs macro file (such as ctags.emf) is to be used, simply give the name of the macro file to be run as the "tag-command" argument. Alternatively set the variable .<$buffer-fhook>.tags to this name, e.g. for C files
set-variable .fhook-c.tags "ctags"
Note the ".emf" extension is assumed.
When an external shell command is to be used, set the tag-command to the shell command-line prefixed with a '!' character, for example to use ctags(1) try the following:
set-variable .fhook-c.tags "!ctags *.c *h"
Note that the generate-tags dialog is not available in this mode of execution.
(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12