diff options
| author | Glenn Morris | 2012-02-01 21:57:26 -0500 |
|---|---|---|
| committer | Glenn Morris | 2012-02-01 21:57:26 -0500 |
| commit | 12f381b73de44148af86efd823ff69c637dedeec (patch) | |
| tree | 45feea574b567912406e1039861c837b392511e8 /lisp | |
| parent | 44f9273998bc2b42e2b17b4bb35b4e0f0e1cf27d (diff) | |
| download | emacs-12f381b73de44148af86efd823ff69c637dedeec.tar.gz emacs-12f381b73de44148af86efd823ff69c637dedeec.zip | |
Document change-major-mode-after-body-hook
* doc/lispref/hooks.texi (Standard Hooks):
* doc/lispref/modes.texi (Major Mode Conventions, Mode Hooks):
Document change-major-mode-after-body-hook.
* lisp/subr.el (run-mode-hooks): Doc fix.
* etc/NEWS: Markup
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/subr.el | 10 |
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 @@ | |||
| 1 | 2012-02-02 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * subr.el (run-mode-hooks): Doc fix. | ||
| 4 | |||
| 1 | 2012-02-02 Juri Linkov <juri@jurta.org> | 5 | 2012-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. |
| 1542 | Execution is delayed if the variable `delay-mode-hooks' is non-nil. | 1542 | If the variable `delay-mode-hooks' is non-nil, does not run any hooks, |
| 1543 | Otherwise, runs the mode hooks and then `after-change-major-mode-hook'. | 1543 | just adds the HOOKS to the list `delayed-mode-hooks'. |
| 1544 | Major mode functions should use this instead of `run-hooks' when running their | 1544 | Otherwise, runs hooks in the sequence: `change-major-mode-after-body-hook', |
| 1545 | FOO-mode-hook." | 1545 | `delayed-mode-hooks' (in reverse order), HOOKS, and finally |
| 1546 | `after-change-major-mode-hook'. Major mode functions should use | ||
| 1547 | this 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) |