X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/490a9458c8310140a255b30330e9940fb68e27ef..90de50e27049ae19492dd9843e50618ea4ed5d14:/lisp/emacs-lisp/derived.el diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el index 684f9d9087..a6ccedc031 100644 --- a/lisp/emacs-lisp/derived.el +++ b/lisp/emacs-lisp/derived.el @@ -1,11 +1,11 @@ ;;; derived.el --- allow inheritance of major modes ;; (formerly mode-clone.el) -;; Copyright (C) 1993-1994, 1999, 2001-2013 Free Software Foundation, +;; Copyright (C) 1993-1994, 1999, 2001-2014 Free Software Foundation, ;; Inc. ;; Author: David Megginson (dmeggins@aix1.uottawa.ca) -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: extensions ;; Package: emacs @@ -192,12 +192,11 @@ See Info node `(elisp)Derived Modes' for more details." parent child docstring syntax abbrev)) `(progn - (unless (get ',hook 'variable-documentation) - (put ',hook 'variable-documentation - (purecopy ,(format "Hook run when entering %s mode. + (defvar ,hook nil + ,(format "Hook run after 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)))) + name)) (unless (boundp ',map) (put ',map 'definition-name ',child)) (with-no-warnings (defvar ,map (make-sparse-keymap)))