parent child docstring syntax abbrev))
`(progn
- (defvar ,hook nil ,(format "Hook run when entering %s mode." name))
+ (unless (get ',hook 'variable-documentation)
+ (put ',hook 'variable-documentation
+ ,(format "Hook run when entering %s mode.
+No problems result if this variable is not bound.
+`add-hook' automatically binds it. (This is true for all hook variables.)"
+ name)))
(defvar ,map (make-sparse-keymap))
,(if declare-syntax
`(defvar ,syntax (make-syntax-table)))