]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/derived.el
(ad-subr-arglist): Simplify.
[gnu-emacs] / lisp / emacs-lisp / derived.el
index 8d152f391bc6def25eea97c2f26779e5ea19ffc6..811511a1f00da77869c50cd38ebad107fb6a8755 100644 (file)
@@ -155,7 +155,10 @@ the parent, and then sets the variable `case-fold-search' to nil:
     (setq case-fold-search nil))
 
 Note that if the documentation string had been left out, it would have
-been generated automatically, with a reference to the keymap."
+been generated automatically, with a reference to the keymap.
+
+The new mode runs the hook constructed by the function
+`derived-mode-hook-name'."
   (declare (debug (&define name symbolp sexp [&optional stringp]
                           [&rest keywordp sexp] def-body)))
 
@@ -187,6 +190,7 @@ been generated automatically, with a reference to the keymap."
                     parent child docstring syntax abbrev))
 
     `(progn
+       (defvar ,hook nil ,(format "Hook run when entering %s mode." name))
        (defvar ,map (make-sparse-keymap))
        ,(if declare-syntax
            `(defvar ,syntax (make-syntax-table)))
@@ -433,4 +437,5 @@ Where the new table already has an entry, nothing is copied from the old one."
 
 (provide 'derived)
 
+;;; arch-tag: 630be248-47d1-4f02-afa0-8207de0ebea0
 ;;; derived.el ends here