ElispAreaConventions

This is the place for guidelines and existing coding practices for EmacsLisp files on EmacsWiki pages (the ElispArea).

Guidelines that say “should” are paraphrased from the EmacsLispReference. Text in angle brackets (<, >) is exemplary only – replace it with your text. Note, in particular, the difference between lines that start with ;;; and lines that start with ;;. Three semi-colons indicate major file sections.

The major section headings are, in order:

Here are descriptions of all commonly used (or proposed) sections:

These fields can be automatically updated by using Lisp:header2.el – see AutomaticFileHeaders.

FWIW, the EmacsLispReference suggests for files contributed to GNU (Info node `Emacs Lisp Coding Conventions’):

Please keep the names of your Emacs Lisp source files to 13 characters or less. This way, if the files are compiled, the compiled files’ names will be 14 characters or less, which is short enough to fit on all kinds of Unix systems.

Relying on case in filenames is not a very good idea, either. Sure, it works on UNIX:ish systems, but not in Windows.

See also: AutomaticFileHeaders for automatic insertion of appropriate file headers.

See also: CheckDoc for help in following self-documentation practices for EmacsLisp code