Mercurial > emacs
changeset 46072:fb621b18f76e
(define-derived-mode): Preserve `mode-class' rather than `special' property.
(derived-mode-class): Make it obsolete.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 28 Jun 2002 14:57:08 +0000 |
parents | 551bc05a51c3 |
children | 58a34a457ab8 |
files | lisp/derived.el |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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