Appendix H Emacs

LCLint can be used most productively with the emacs text editor. The release package includes emacs files for running LCLint and editing code with annotations.

Editing Abbreviations

An additional file, emacs/lclint-abbrevs contains abbreviations for LCLint syntactic comments and annotations. If it is loaded, the comment surrounding an LCLint annotation will be added automatically. For example, typing "only" and a space, will produce "/*@[email protected]*/ ". Abbreviations are provided for each LCLint syntactic comment. The abbreviation of /*@[email protected]*/ is nll (not null), since it is often necessary to type NULL.

Abbreviations are loaded and used when a .c or .h file is edited by adding these lines to your .emacs file:

(quietly-read-abbrev-file "<directory>/lclint-abbrevs")

(setq c-mode-hook (function (lambda nil (abbrev-mode 1))))

Next Section Contents LCLint Home Page David Evans
University of Virginia, Computer Science
[email protected]