Commit de649872 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(define-derived-mode): Make generated code work in

Emacs versions that do not have run-mode-hooks.
parent 1d24f618
......@@ -225,8 +225,12 @@ been generated automatically, with a reference to the keymap."
; Splice in the body (if any).
,@body
)
; Run the hooks, if any.
(run-mode-hooks ',hook)))))
;; Run the hooks, if any.
;; Make the generated code work in older Emacs versions
;; that do not yet have run-mode-hooks.
(if (fboundp 'run-mode-hooks)
(run-mode-hooks ',hook)
(run-hooks ',hook))))))
;; PUBLIC: find the ultimate class of a derived mode.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment