(define-derived-mode): Use {delay,run}-mode-hooks.
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 25 Oct 2001 03:17:33 +0000 (03:17 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 25 Oct 2001 03:17:33 +0000 (03:17 +0000)
(derived-mode-p): Autoload.

lisp/derived.el

index 9512bae..ffebfd5 100644 (file)
@@ -151,7 +151,7 @@ been generated automatically, with a reference to the keymap."
         ,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 @@ been generated automatically, with a reference to the keymap."
          (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."