Next: Library Headers, Previous: Documentation Tips, Up: Tips
We recommend these conventions for comments:
(setq base-version-list ; There was a base (assoc (substring fn 0 start-vn) ; version to which file-version-assoc-list)) ; this looks like ; a subversion.
(prog1 (setq auto-fill-function ... ... ;; Update mode line. (force-mode-line-update)))
We also normally use two semicolons for comments outside functions.
;; This Lisp code is run in Emacs when it is to operate as ;; a server for other processes.
If a function has no documentation string, it should instead have a
two-semicolon comment right before the function, explaining what the
function does and how to call it properly. Explain precisely what
each argument means and how the function interprets its possible
values. It is much better to convert such comments to documentation
strings, though.
When commenting out entire functions, use two semicolons.
;;;; The kill ring
Generally speaking, the M-; (comment-dwim
) command
automatically starts a comment of the appropriate type; or indents an
existing comment to the right place, depending on the number of
semicolons.
See Manipulating Comments.