(run-mode-hooks): Run `after-change-major-mode-hook' after the
mode-hooks instead of before. Doc fix.
This commit is contained in:
parent
98b83a887e
commit
6d9ac082df
2 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-09-20 Luc Teirlinck <teirllm@auburn.edu>
|
||||
|
||||
* subr.el (run-mode-hooks): Run `after-change-major-mode-hook'
|
||||
after the mode-hooks instead of before. Doc fix.
|
||||
|
||||
2004-09-20 Jason Rumney <jasonr@gnu.org>
|
||||
|
||||
* startup.el (command-line) [windows-nt]: Try .emacs first, then
|
||||
|
@ -20,9 +25,9 @@
|
|||
|
||||
* eshell/esh-ext.el (eshell-explicit-command-char): Doc fix.
|
||||
|
||||
* progmodes/make-mode.el (makefile-fill-paragraph):
|
||||
* progmodes/make-mode.el (makefile-fill-paragraph):
|
||||
Don't insist on spaces when looking for comments. # is enough.
|
||||
|
||||
|
||||
* files.el (hack-local-variables): Copy the variables list
|
||||
to another buffer, strip prefixes and suffixes there, then read.
|
||||
(enable-local-eval): Doc fix.
|
||||
|
|
|
@ -1944,6 +1944,8 @@ This is run just before the mode dependent hooks.")
|
|||
(defun run-mode-hooks (&rest hooks)
|
||||
"Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
|
||||
Execution is delayed if `delay-mode-hooks' is non-nil.
|
||||
If `delay-mode-hooks' is nil, run `after-change-major-mode-hook'
|
||||
after running the mode hooks.
|
||||
Major mode functions should use this."
|
||||
(if delay-mode-hooks
|
||||
;; Delaying case.
|
||||
|
@ -1952,8 +1954,8 @@ Major mode functions should use this."
|
|||
;; Normal case, just run the hook as before plus any delayed hooks.
|
||||
(setq hooks (nconc (nreverse delayed-mode-hooks) hooks))
|
||||
(setq delayed-mode-hooks nil)
|
||||
(run-hooks 'after-change-major-mode-hook)
|
||||
(apply 'run-hooks hooks)))
|
||||
(apply 'run-hooks hooks)
|
||||
(run-hooks 'after-change-major-mode-hook)))
|
||||
|
||||
(defmacro delay-mode-hooks (&rest body)
|
||||
"Execute BODY, but delay any `run-mode-hooks'.
|
||||
|
|
Loading…
Add table
Reference in a new issue