# HG changeset patch # User Stefan Monnier # Date 1025276228 0 # Node ID fb621b18f76e0406b2f20b92bcd34010c066fb24 # Parent 551bc05a51c3dd21cd1ee0e4f2a6a87809009615 (define-derived-mode): Preserve `mode-class' rather than `special' property. (derived-mode-class): Make it obsolete. diff -r 551bc05a51c3 -r fb621b18f76e lisp/derived.el --- a/lisp/derived.el Fri Jun 28 12:39:46 2002 +0000 +++ b/lisp/derived.el Fri Jun 28 14:57:08 2002 +0000 @@ -178,8 +178,9 @@ ; Identify special modes. ,(when parent `(progn - (if (get (quote ,parent) 'special) - (put (quote ,child) 'special t)) + (if (get (quote ,parent) 'mode-class) + (put (quote ,child) 'mode-class + (get (quote ,parent) 'mode-class))) ; Set up maps and tables. (unless (keymap-parent ,map) (set-keymap-parent ,map (current-local-map))) @@ -209,11 +210,12 @@ "Find the class of a major MODE. A mode's class is the first ancestor which is NOT a derived mode. Use the `derived-mode-parent' property of the symbol to trace backwards. -Since major-modes might derive from each other and from `fundamental-mode', -this function is not very useful. Use `derived-mode-p' instead." +Since major-modes might all derive from `fundamental-mode', this function +is not very useful." (while (get mode 'derived-mode-parent) (setq mode (get mode 'derived-mode-parent))) mode) +(make-obsolete 'derived-mode-class 'derived-mode-p "21.4") ;;; PRIVATE