Automated Comment Insertion

To simplify the insertion of comments that will be parsed by cxref, the file cxref.el provides a number of Emacs lisp functions. To use them add the line (load "cxref") to your ``.emacs'' file or type M-x load-file cxref.el from within Emacs.

The functions and key bindings are:

Control-C Control-F
Adds file comments, a /** **/ header at the top of the file and if it is a .h file then it also adds a #ifndef, #define at the beginning and #endif at the end to stop multiple inclusions.
Control-C f
Adds comments to a function, the cursor must be on the line containing the start of the function definition when this function is called. The /*+ ... +*/ comment that is added is of the header type (see the examples) not inline.
Control-C v
Adds a leading comment to the variable or other definition on the current line.
Control-C e
Adds a trailing comment at the end of the line.
Control-C i
Adds an inline comment that is ignored by cxref.