Mercurial > emacs
changeset 40283:628cde7da5bc
(define-derived-mode): Use {delay,run}-mode-hooks.
(derived-mode-p): Autoload.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 25 Oct 2001 03:17:33 +0000 |
parents | 7f05eff77ea2 |
children | 1b45ff920a8c |
files | lisp/derived.el |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/derived.el Thu Oct 25 02:26:41 2001 +0000 +++ b/lisp/derived.el Thu Oct 25 03:17:33 2001 +0000 @@ -151,7 +151,7 @@ ,docstring (interactive) ; Run the parent. - ;; (combine-run-hooks + (delay-mode-hooks (,(or parent 'kill-all-local-variables)) ; Identify the child mode. @@ -181,12 +181,13 @@ (setq local-abbrev-table ,abbrev) ; Splice in the body (if any). ,@body - ;; ) + ) ; Run the hooks, if any. - (run-hooks ',hook))))) + (run-mode-hooks ',hook))))) ;; PUBLIC: find if the current mode derives from another. +;;; ;;;###autoload (defun derived-mode-p (&rest modes) "Non-nil if the current major mode is derived from one of MODES. Uses the `derived-mode-parent' property of the symbol to trace backwards."