]> git.eshelyaron.com Git - emacs.git/commitdiff
(run-mode-hooks): Run `after-change-major-mode-hook' after the
authorLuc Teirlinck <teirllm@auburn.edu>
Tue, 21 Sep 2004 00:40:06 +0000 (00:40 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Tue, 21 Sep 2004 00:40:06 +0000 (00:40 +0000)
mode-hooks instead of before.  Doc fix.

lisp/ChangeLog
lisp/subr.el

index 88cebb15340eb72c851b172028a9c7ef0d4e2fa2..20a2f5987bd42daa990cbfea10db1336c917b051 100644 (file)
@@ -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.
index d7bfcc1f7fee07fdb8e663f57ef7f06327f6c67a..cb8f76bc070eaca4490546267310684a8569e092 100644 (file)
@@ -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'.