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-cgf | An @file header |
\C-cgr | An @routine header |
\C-cge | An @header header |
\C-cgv | An @var header |
\C-cgp | An @par header |
\C-cgh | An @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 " ")))