aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/subr.el10
2 files changed, 10 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc6aecd7a26..4290c5e820d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12012-02-02 Glenn Morris <rgm@gnu.org>
2
3 * subr.el (run-mode-hooks): Doc fix.
4
12012-02-02 Juri Linkov <juri@jurta.org> 52012-02-02 Juri Linkov <juri@jurta.org>
2 6
3 * image-mode.el (image-toggle-display-image): Remove tautological 7 * image-mode.el (image-toggle-display-image): Remove tautological
diff --git a/lisp/subr.el b/lisp/subr.el
index c9e213c86a0..36bca654208 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1539,10 +1539,12 @@ if it is empty or a duplicate."
1539 1539
1540(defun run-mode-hooks (&rest hooks) 1540(defun run-mode-hooks (&rest hooks)
1541 "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. 1541 "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS.
1542Execution is delayed if the variable `delay-mode-hooks' is non-nil. 1542If the variable `delay-mode-hooks' is non-nil, does not run any hooks,
1543Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. 1543just adds the HOOKS to the list `delayed-mode-hooks'.
1544Major mode functions should use this instead of `run-hooks' when running their 1544Otherwise, runs hooks in the sequence: `change-major-mode-after-body-hook',
1545FOO-mode-hook." 1545`delayed-mode-hooks' (in reverse order), HOOKS, and finally
1546`after-change-major-mode-hook'. Major mode functions should use
1547this instead of `run-hooks' when running their FOO-mode-hook."
1546 (if delay-mode-hooks 1548 (if delay-mode-hooks
1547 ;; Delaying case. 1549 ;; Delaying case.
1548 (dolist (hook hooks) 1550 (dolist (hook hooks)