Documentation

At a minimum, your source files should contain enough commentary in the beginning comment block so that readers can understand what they're for. Ideally, your code will also be self-documenting—i.e., you will have made liberal and effective use of docstrings in all your function and variable definitions.

If you're ambitious about writing documentation, you might want to consider creating a Texinfo manual for your package. Texinfo is the standard documentation format of the GNU system. Texinfo files can be processed with the makeinfo program to produce Info files, which are browsable, tree-structured text files that can be viewed in Emacs's Info mode. Texinfo files can also be processed with the TEX typesetting system to produce nicely-formatted printed manuals.

An excellent Info manual on how to write Texinfo manuals accompanies the GNU texinfo package, which includes makeinfo. For information on obtaining it or TEX, see Appendix E.

Get Writing GNU Emacs Extensions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.