# etf(8)

[Home] [Commands] [Variables] [Macro-Dev] [Glossary]

## NAME

etf - MicroEmacs template file format

## SYNOPSIS

<Free Form Text>

## DESCRIPTION

The MicroEmacs 2009 template file, typically given the extension .etf, is a file template for a new file and defines common text that is automatically included when a new file is created.

The file inclusion is usually performed by macro etfinsrt(3), called from the File Hooks. The template file has no specific format, although etfinsrt replaces key strings with relevant information.

## EXAMPLE

The template file is inserted with the file hooks. If a file hook is called with an argument of `0` then the buffer has been created and the template file is inserted.

    define-macro fhook-c
        ; if arg is 0 this is a new file so add template
        !if &not @#
            ; Is it an include h file or a c file?
            !if &seq &mid $buffer-bname &rsin "." $buffer-bname 1 "h"
                etfinsrt "h"
            !else
                etfinsrt "c"
            !endif
        !endif
        1 buffer-mode "time"
        .
        .
    !emacro

See etfinsrt(3) for more information on how the template file is located and inserted into the buffer.

The default MicroEmacs 2009 'C' mode template is defined as follows, but may be replaced with any other text:-

    /* -*- C -*- ****************************************************************
     *
     *  			Copyright $YEAR$ $COMPANY_NAME$.
     *			      All Rights Reserved
     *
     *
     *  System        :
     *  Module        :
     *  Object Name   : m8fil001.8
     *  Created By    : $USER_NAME$
     *  Created       : $ASCII_TIME$
     *  Last Modified : <090829.1633>
     *
     *  Description
     *
     *  Notes
     *
     *  History
     *
     ****************************************************************************
     *
     *  Copyright (c) $YEAR$ $COMPANY_NAME$.
     *
     *  All Rights Reserved.
     *
     * This  document  may  not, in  whole  or in  part, be  copied,  photocopied,
     * reproduced,  translated,  or  reduced to any  electronic  medium or machine
     * readable form without prior written consent from $COMPANY_NAME$.
     *
     ****************************************************************************/

    static const char rcsid[] = "@(#) : $Id$";

## FILES

The default template files are located in the MicroEmacs 2009 home directory.

User's may specify their own template files by shadowing the home directory file with their own file located in a personal MicroEmacs 2009 directory. See $user-path(5).

## SEE ALSO

File Hooks.
etfinsrt(3), &find(4), $user-path(5).

(c) Copyright JASSPA 2009
Last Modified: 2009/08/29
Generated On: 2009/10/12

</HMTL>