mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-25 07:28:20 +00:00
(define-derived-mode): Remove defvar for mode hook. (It conflicted
with defcustoms for some mode hooks.) Use the `variable-documentation' property to give the mode hook a docstring and expand that docstring.
This commit is contained in:
parent
2d10b62be6
commit
156680e2df
@ -194,7 +194,12 @@ See Info node `(elisp)Derived Modes' for more details."
|
||||
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)))
|
||||
|
Loading…
Reference in New Issue
Block a user