;; default, but may be redefined by the user to contain special
;; commands (ie. setting local variables like 'outline-regexp')
;; **NOTE: do not use this option -- it will soon be obsolete.
-;; - run anything assigned to 'hypertext-mode-hooks' (obsolete, but
+;; - run anything assigned to 'hypertext-mode-hook' (obsolete, but
;; supported for the sake of compatibility).
;;
;; The advantages of this system are threefold. First, text mode is
;;; ; any -- this will soon be
;;; ; obsolete.
;;; (derived-mode-run-setup-function '(, child))
- ; Run the hooks, if any.
+ ; Run the hook, if any.
(derived-mode-run-hooks '(, child))))))
"Construct a setup-function name based on a mode name."
(intern (concat (symbol-name mode) "-setup")))
-(defsubst derived-mode-hooks-name (mode)
- "Construct a hooks name based on a mode name."
- (intern (concat (symbol-name mode) "-hooks")))
+(defsubst derived-mode-hook-name (mode)
+ "Construct the mode hook name based on mode name MODE."
+ (intern (concat (symbol-name mode) "-hook")))
(defsubst derived-mode-map-name (mode)
"Construct a map name based on a mode name."
;;; (funcall fname))))
(defun derived-mode-run-hooks (mode)
- "Run the hooks if they exist."
+ "Run the mode hook for MODE."
- (let ((hooks-name (derived-mode-hooks-name mode)))
+ (let ((hooks-name (derived-mode-hook-name mode)))
(if (boundp hooks-name)
(run-hooks hooks-name))))