Auto-insert header into code file


In homework style guidelines, each code file should have a header. This can be done very easily if you use emacs editor. First, in your .access file, you should add these lines at the beginning (for C files only):
 (add-hook 'find-file-hooks 'auto-insert)
  (setq auto-insert-directory (expand-file-name "~/.autoinsert/"))
 (define-auto-insert "\\.c\\'" "autoinsert.c")
Then, in you root directory, you can create a directory named .autoinsert. In this directory, you can type our header format into autoinsert.c:
 /* filename; Name: submitter's name(s); Lab: e.g. 1,2, etc; Expected Date submitted: e.g. 01/07/02 */

Atilla Soner Balkir