aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorLuc Teirlinck <[email protected]>2004-09-21 00:40:06 +0000
committerLuc Teirlinck <[email protected]>2004-09-21 00:40:06 +0000
commit6d9ac082df6364ee19b251124f2ea291e7481651 (patch)
tree9d995dfad1f5bc80d5719329cd232a567e3aef53 /lisp
parent98b83a887e62e48b981d8f29e973028926cbb8f2 (diff)
(run-mode-hooks): Run `after-change-major-mode-hook' after the
mode-hooks instead of before. Doc fix.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/subr.el6
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88cebb1534..20a2f5987b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-20 Luc Teirlinck <[email protected]>
+
+ * 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 <[email protected]>
* 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.
diff --git a/lisp/subr.el b/lisp/subr.el
index d7bfcc1f7f..cb8f76bc07 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -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'.