X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/04c817d4679ee3a6c1614328696b6a28e3195e38..c6fa13e32703f8b0634401778a758e76f2798f97:/lisp/derived.el diff --git a/lisp/derived.el b/lisp/derived.el index 2aa97b9d58..b837922865 100644 --- a/lisp/derived.el +++ b/lisp/derived.el @@ -5,6 +5,7 @@ ;; Author: David Megginson (dmeggins@aix1.uottawa.ca) ;; Maintainer: FSF +;; Keywords: obsolete ;; This file is part of GNU Emacs. @@ -25,6 +26,13 @@ ;;; Commentary: +;; Obsolete. +;; Use the `derived-major-mode' provided by easy-mmode.el instead. +;; It is only kept for backward compatibility with Emacs-20 byte-compiled +;; files that refer to `derived-mode-init-mode-variables' and other functions. + + + ;; GNU Emacs is already, in a sense, object oriented -- each object ;; (buffer) belongs to a class (major mode), and that class defines ;; the relationship between messages (input events) and methods @@ -95,7 +103,9 @@ ;; PUBLIC: define a new major mode which inherits from an existing one. -;;;###autoload +;; ;;;###autoload +;; Don't override the definition provided by easy-mmode.el +(unless (fboundp 'define-derived-mode) (defmacro define-derived-mode (child parent name &optional docstring &rest body) "Create a new mode as a variant of an existing mode. @@ -160,7 +170,7 @@ been generated automatically, with a reference to the keymap." ;;; ; obsolete. ;;; (derived-mode-run-setup-function (quote ,child)) ; Run the hooks, if any. - (derived-mode-run-hooks (quote ,child))))) + (derived-mode-run-hooks (quote ,child)))))) ;; PUBLIC: find the ultimate class of a derived mode.