diff options
| author | Luc Teirlinck | 2004-09-21 00:40:06 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2004-09-21 00:40:06 +0000 |
| commit | 6d9ac082df6364ee19b251124f2ea291e7481651 (patch) | |
| tree | 9d995dfad1f5bc80d5719329cd232a567e3aef53 | |
| parent | 98b83a887e62e48b981d8f29e973028926cbb8f2 (diff) | |
| download | emacs-6d9ac082df6364ee19b251124f2ea291e7481651.tar.gz emacs-6d9ac082df6364ee19b251124f2ea291e7481651.zip | |
(run-mode-hooks): Run `after-change-major-mode-hook' after the
mode-hooks instead of before. Doc fix.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/subr.el | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88cebb15340..20a2f5987bd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-09-20 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * subr.el (run-mode-hooks): Run `after-change-major-mode-hook' | ||
| 4 | after the mode-hooks instead of before. Doc fix. | ||
| 5 | |||
| 1 | 2004-09-20 Jason Rumney <jasonr@gnu.org> | 6 | 2004-09-20 Jason Rumney <jasonr@gnu.org> |
| 2 | 7 | ||
| 3 | * startup.el (command-line) [windows-nt]: Try .emacs first, then | 8 | * startup.el (command-line) [windows-nt]: Try .emacs first, then |
| @@ -20,9 +25,9 @@ | |||
| 20 | 25 | ||
| 21 | * eshell/esh-ext.el (eshell-explicit-command-char): Doc fix. | 26 | * eshell/esh-ext.el (eshell-explicit-command-char): Doc fix. |
| 22 | 27 | ||
| 23 | * progmodes/make-mode.el (makefile-fill-paragraph): | 28 | * progmodes/make-mode.el (makefile-fill-paragraph): |
| 24 | Don't insist on spaces when looking for comments. # is enough. | 29 | Don't insist on spaces when looking for comments. # is enough. |
| 25 | 30 | ||
| 26 | * files.el (hack-local-variables): Copy the variables list | 31 | * files.el (hack-local-variables): Copy the variables list |
| 27 | to another buffer, strip prefixes and suffixes there, then read. | 32 | to another buffer, strip prefixes and suffixes there, then read. |
| 28 | (enable-local-eval): Doc fix. | 33 | (enable-local-eval): Doc fix. |
diff --git a/lisp/subr.el b/lisp/subr.el index d7bfcc1f7fe..cb8f76bc070 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1944,6 +1944,8 @@ This is run just before the mode dependent hooks.") | |||
| 1944 | (defun run-mode-hooks (&rest hooks) | 1944 | (defun run-mode-hooks (&rest hooks) |
| 1945 | "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. | 1945 | "Run mode hooks `delayed-mode-hooks' and HOOKS, or delay HOOKS. |
| 1946 | Execution is delayed if `delay-mode-hooks' is non-nil. | 1946 | Execution is delayed if `delay-mode-hooks' is non-nil. |
| 1947 | If `delay-mode-hooks' is nil, run `after-change-major-mode-hook' | ||
| 1948 | after running the mode hooks. | ||
| 1947 | Major mode functions should use this." | 1949 | Major mode functions should use this." |
| 1948 | (if delay-mode-hooks | 1950 | (if delay-mode-hooks |
| 1949 | ;; Delaying case. | 1951 | ;; Delaying case. |
| @@ -1952,8 +1954,8 @@ Major mode functions should use this." | |||
| 1952 | ;; Normal case, just run the hook as before plus any delayed hooks. | 1954 | ;; Normal case, just run the hook as before plus any delayed hooks. |
| 1953 | (setq hooks (nconc (nreverse delayed-mode-hooks) hooks)) | 1955 | (setq hooks (nconc (nreverse delayed-mode-hooks) hooks)) |
| 1954 | (setq delayed-mode-hooks nil) | 1956 | (setq delayed-mode-hooks nil) |
| 1955 | (run-hooks 'after-change-major-mode-hook) | 1957 | (apply 'run-hooks hooks) |
| 1956 | (apply 'run-hooks hooks))) | 1958 | (run-hooks 'after-change-major-mode-hook))) |
| 1957 | 1959 | ||
| 1958 | (defmacro delay-mode-hooks (&rest body) | 1960 | (defmacro delay-mode-hooks (&rest body) |
| 1959 | "Execute BODY, but delay any `run-mode-hooks'. | 1961 | "Execute BODY, but delay any `run-mode-hooks'. |