etf(8)etf - MicroEmacs template file format
<Free Form Text>
The MicroEmacs 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 insert-template(3), called from the File Hooks. The template file has no specific format, although insert-template replaces key strings with relevant information.
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 ¬ @# ; Is it an include h file or a c file? !if &seq &mid $buffer-bname &rsin "." $buffer-bname 1 "h" insert-template "h" !else insert-template "c" !endif !endif 1 buffer-mode "time" . . !emacro
See insert-template(3) for more information on how the template file is located and inserted into the buffer.
The default MicroEmacs '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 : <250316.0854> * * 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$";
The default template files are located in the MicroEmacs 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 directory. See $user-path(5).
(c) Copyright JASSPA 2025
Last Modified: 2024/11/10
Generated On: 2025/09/29