From: Richard M. Stallman Date: Sat, 8 Feb 1997 20:17:04 +0000 (+0000) Subject: (define-derived-mode): Add derived-mode-parent X-Git-Tag: emacs-20.1~2962 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7ada1a07ac69e22848be740861e9d558b8abf5d7;p=emacs.git (define-derived-mode): Add derived-mode-parent property to the defived mode command name. --- diff --git a/lisp/derived.el b/lisp/derived.el index 48824a61ec2..d50ac6d288c 100644 --- a/lisp/derived.el +++ b/lisp/derived.el @@ -143,30 +143,31 @@ been generated automatically, with a reference to the keymap." (setq docstring (or docstring (derived-mode-make-docstring parent child))) (` (progn - (derived-mode-init-mode-variables (quote (, child))) + (derived-mode-init-mode-variables '(, child)) + (put '(, child) 'derived-mode-parent '(, parent)) (defun (, child) () (, docstring) (interactive) ; Run the parent. ((, parent)) ; Identify special modes. - (if (get (quote (, parent)) 'special) - (put (quote (, child)) 'special t)) + (if (get '(, parent) 'special) + (put '(, child) 'special t)) ; Identify the child mode. - (setq major-mode (quote (, child))) + (setq major-mode '(, child)) (setq mode-name (, name)) ; Set up maps and tables. - (derived-mode-set-keymap (quote (, child))) - (derived-mode-set-syntax-table (quote (, child))) - (derived-mode-set-abbrev-table (quote (, child))) + (derived-mode-set-keymap '(, child)) + (derived-mode-set-syntax-table '(, child)) + (derived-mode-set-abbrev-table '(, child)) ; Splice in the body (if any). (,@ body) ;;; ; Run the setup function, if ;;; ; any -- this will soon be ;;; ; obsolete. -;;; (derived-mode-run-setup-function (quote (, child))) +;;; (derived-mode-run-setup-function '(, child)) ; Run the hooks, if any. - (derived-mode-run-hooks (quote (, child))))))) + (derived-mode-run-hooks '(, child)))))) ;; PUBLIC: find the ultimate class of a derived mode.