diff options
| author | Ihor Radchenko | 2024-05-03 10:46:22 +0300 |
|---|---|---|
| committer | Stefan Monnier | 2024-05-03 11:02:54 -0400 |
| commit | 15c77f2fce418983147346589158e2f0da97fa43 (patch) | |
| tree | 99b99e20225152e770a3c686d3a1559374b92800 | |
| parent | 4078d0fd3ee9e55c3da219aa6e7788ac6130697b (diff) | |
| download | emacs-15c77f2fce418983147346589158e2f0da97fa43.tar.gz emacs-15c77f2fce418983147346589158e2f0da97fa43.zip | |
mhtml-mode: Use `run-mode-hook' to run `prog-mode-hook' (bug#70671)
* lisp/textmodes/mhtml-mode.el (mhtml-mode): When running hooks
simulating inheritance from `prog-mode', use `run-mode-hooks' that
honors `delay-mode-hooks' macro. Note that `delay-mode-hooks' is bound
to non-nil when major mode body is evaluated, so there is no chance that
any major mode-related hooks are executed twice.
| -rw-r--r-- | lisp/textmodes/mhtml-mode.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index 0b5c6756ab9..e2de6959dc6 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el | |||
| @@ -359,7 +359,7 @@ the rules from `css-mode'." | |||
| 359 | (add-hook 'before-change-functions #'c-foreign-truncate-lit-pos-cache nil t) | 359 | (add-hook 'before-change-functions #'c-foreign-truncate-lit-pos-cache nil t) |
| 360 | 360 | ||
| 361 | ;; This is sort of a prog-mode as well as a text mode. | 361 | ;; This is sort of a prog-mode as well as a text mode. |
| 362 | (run-hooks 'prog-mode-hook)) | 362 | (run-mode-hooks 'prog-mode-hook)) |
| 363 | 363 | ||
| 364 | (put 'mhtml-mode 'flyspell-mode-predicate #'mhtml--flyspell-check-word) | 364 | (put 'mhtml-mode 'flyspell-mode-predicate #'mhtml--flyspell-check-word) |
| 365 | 365 | ||