grdoc emacs minor mode

Alan Shutko (ats@hubert.wustl.edu) has written a grdoc emacs minor mide for inserting grdoc comments into your source code. It determines date, author, and filename from the system, and limited amount of "artificial intelligence" about your comments based on the structure of your existing code is under development. Although using this minor mode is by no means required to use grdoc, it is a very useful way to quickly write your documentation.

This minor mode requires tempo.el and easymenu.el, eg, requires a recent version of emace (>= 19.29) xemacs (>= 19.13) or a site where the emacs admin has installed these packages. (Of course, you can simply install them yourself in your own load path).

To use it, place grdoc.el, included in the distribution, in your load path, require it, and then add a turn-on-grdoc.mode to your language hooks as shown.

(require 'grdoc)
(add-hook 'fortran-mode-hook 'turn-on-grdoc-mode)
(add-hook 'c-mode-hook 'turn-on-grdoc-mode)
The key bindings for inserting blocks are:
\C-cgfAn @file header
\C-cgrAn @routine header
\C-cgeAn @header header
\C-cgvAn @var header
\C-cgpAn @par header
\C-cghAn @hist line

These templates are interactive templates by default (eg, they prompt you for some information). If you want to change this behaviour, you should add to your .emacs after loading

(setq grdoc-use-interactive nil)
some place in your code.

These templates also insert a comment character in fortran mode before the block. If you don't want this (eg, you want fortran mode to use c-style comments) you should add to your .emacs along with the hooks shown above.

(add-hook 'fortran-mode-hook '(lambda () (setq grdoc-comment-start " ")))