Variable: mhtml-mode-hook
mhtml-mode-hook is a variable defined in mhtml-mode.el.gz.
Value
(#[0 "\302\300!\210\302\301!\210\303\304\302\305!\207"
[comment-start comment-end make-local-variable "<!--" "-->"
sentence-end]
2]
(lambda nil
(let
((syntax-table (symbol-value 'mhtml-mode-syntax-table))
(keymap (symbol-value 'mhtml-mode-map)))
(modify-syntax-entry 123 "(}" syntax-table)
(modify-syntax-entry 125 "){" syntax-table)
(modify-syntax-entry 34 "\"" syntax-table)
(modify-syntax-entry 61 "." syntax-table)
(modify-syntax-entry 46 "_" syntax-table)
(setq sentence-end
"\\([^ \n
>]<\\|>\\(<[^>]*>\\)*\\|[.?!][]\"')}]*\\($\\| $\\| \\| \\)\\)[ \n]*")
(define-key keymap "." 'hui-select-goto-matching-tag))))
Documentation
Hook run after entering mhtml-mode.
No problems result if this variable is not bound.
add-hook automatically binds it. (This is true for all hook variables.)
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/mhtml-mode.el.gz
;;;###autoload
(define-derived-mode mhtml-mode html-mode
'((sgml-xml-mode "XHTML+" "HTML+") (:eval (mhtml--submode-lighter)))
"Major mode based on `html-mode', but works with embedded JS and CSS.
Code inside a <script> element is indented using the rules from
`js-mode'; and code inside a <style> element is indented using
the rules from `css-mode'."
(setq-local indent-line-function #'mhtml-indent-line)
(setq-local syntax-propertize-function #'mhtml-syntax-propertize)
(setq-local font-lock-fontify-region-function
#'mhtml--submode-fontify-region)
;; Attach this to both pre- and post- hooks just in case it ever
;; changes a key binding that might be accessed from the menu bar.
(add-hook 'pre-command-hook #'mhtml--pre-command nil t)
(add-hook 'post-command-hook #'mhtml--pre-command nil t)
;; Make any captured variables buffer-local.
(mhtml--mark-buffer-locals mhtml--css-submode)
(mhtml--mark-buffer-locals mhtml--js-submode)
(mhtml--mark-crucial-buffer-locals mhtml--css-submode)
(mhtml--mark-crucial-buffer-locals mhtml--js-submode)
(setq mhtml--crucial-variables (delete-dups mhtml--crucial-variables))
;: Hack
(js--update-quick-match-re)
;; Setup the appropriate js-mode value of auto-fill-function.
(setf (mhtml--submode-crucial-captured-locals mhtml--js-submode)
(push (cons 'auto-fill-function
(if (and (boundp 'auto-fill-function) auto-fill-function)
#'js-do-auto-fill
nil))
(mhtml--submode-crucial-captured-locals mhtml--js-submode)))
;; This mode might be using CC Mode's filling functionality.
(c-foreign-init-lit-pos-cache)
(add-hook 'before-change-functions #'c-foreign-truncate-lit-pos-cache nil t)
;; This is sort of a prog-mode as well as a text mode.
(run-mode-hooks 'prog-mode-hook))