Started of with a simple header comment generation function for emacs and ended up with a complete template generation hook for the common languages I work with. (C. C++, Java, Lisp and Python). A sample C header file template generated by the hook looks like this:
// Interface to print the 'hello, world' message.
// Date: 05-May-2010
// This program is free software: you can redistribute
// it and/or modify it under the terms of the GNU General
// Public License
// as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program.
#ifndef _HELLO_H_
#define _HELLO_H_
#endif
The complete elisp code of the hook is attached for you to copy/paste to your .emacs file and customize as you wish! User can input the file description interactively. Basic customization is done by modifying the 5 variables at the beginning of the script. New file-types can be easily supported by adding a check in the source-filep function.