aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/derived.el7
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.
192Uses the `derived-mode-parent' property of the symbol to trace backwards." 193Uses the `derived-mode-parent' property of the symbol to trace backwards."