diff options
| author | Stefan Monnier | 2001-10-25 03:17:33 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-10-25 03:17:33 +0000 |
| commit | d6cf8a2463a0286b52a7c474db6715a0cd1ee5c0 (patch) | |
| tree | e5ca10f7f1fec578a085313b500192650bf14e73 | |
| parent | a13fe4c517214b3adc34f0412c6efccf9db8094b (diff) | |
| download | emacs-d6cf8a2463a0286b52a7c474db6715a0cd1ee5c0.tar.gz emacs-d6cf8a2463a0286b52a7c474db6715a0cd1ee5c0.zip | |
(define-derived-mode): Use {delay,run}-mode-hooks.
(derived-mode-p): Autoload.
| -rw-r--r-- | lisp/derived.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/derived.el b/lisp/derived.el index 9512bae492f..ffebfd5bc03 100644 --- a/lisp/derived.el +++ b/lisp/derived.el | |||
| @@ -151,7 +151,7 @@ been generated automatically, with a reference to the keymap." | |||
| 151 | ,docstring | 151 | ,docstring |
| 152 | (interactive) | 152 | (interactive) |
| 153 | ; Run the parent. | 153 | ; Run the parent. |
| 154 | ;; (combine-run-hooks | 154 | (delay-mode-hooks |
| 155 | 155 | ||
| 156 | (,(or parent 'kill-all-local-variables)) | 156 | (,(or parent 'kill-all-local-variables)) |
| 157 | ; Identify the child mode. | 157 | ; Identify the child mode. |
| @@ -181,12 +181,13 @@ been generated automatically, with a reference to the keymap." | |||
| 181 | (setq local-abbrev-table ,abbrev) | 181 | (setq local-abbrev-table ,abbrev) |
| 182 | ; Splice in the body (if any). | 182 | ; Splice in the body (if any). |
| 183 | ,@body | 183 | ,@body |
| 184 | ;; ) | 184 | ) |
| 185 | ; Run the hooks, if any. | 185 | ; Run the hooks, if any. |
| 186 | (run-hooks ',hook))))) | 186 | (run-mode-hooks ',hook))))) |
| 187 | 187 | ||
| 188 | ;; PUBLIC: find if the current mode derives from another. | 188 | ;; PUBLIC: find if the current mode derives from another. |
| 189 | 189 | ||
| 190 | ;;; ;;;###autoload | ||
| 190 | (defun derived-mode-p (&rest modes) | 191 | (defun derived-mode-p (&rest modes) |
| 191 | "Non-nil if the current major mode is derived from one of MODES. | 192 | "Non-nil if the current major mode is derived from one of MODES. |
| 192 | Uses the `derived-mode-parent' property of the symbol to trace backwards." | 193 | Uses the `derived-mode-parent' property of the symbol to trace backwards." |