** Emacs has a new facility to help users manage the many
customization options. To make a Lisp program work with this facility,
you need to use the new macros defgroup and defcustom.
You use defcustom instead of defvar, for defining a user option variable. The difference is that you specify two additional pieces of information (usually): the "type" which says what values are legitimate, and the "group" which specifies the hierarchy for customization.
Thus, instead of writing
(defvar foo-blurgoze nil "*Non-nil means that foo will act very blurgozely.")
you would now write this:
(defcustom foo-blurgoze nil "*Non-nil means that foo will act very blurgozely." :type 'boolean :group foo)
The type `boolean' means that this variable has only two meaningful states: nil and non-nil. Other type values describe other possibilities; see the manual for Custom for a description of them.
The "group" argument is used to specify a group which the option should belong to. You define a new group like this:
(defgroup ispell nil "Spell checking using Ispell." :group 'processes)
The "group" argument in defgroup specifies the parent group. The root group is called `emacs'; it should not contain any variables itself, but only other groups. The immediate subgroups of `emacs' correspond to the keywords used by C-h p. Under these subgroups come second-level subgroups that belong to individual packages.
Each Emacs package should have its own set of groups. A simple package should have just one group; a more complex package should have a hierarchy of its own groups. The sole or root group of a package should be a subgroup of one or more of the "keyword" first-level subgroups.