Mercurial > emacs
diff src/eval.c @ 62709:d66d7efe0adf
(Frun_hooks): Mention run-mode-hooks in docstring.
| author | Lute Kamstra <lute@gnu.org> |
|---|---|
| date | Thu, 26 May 2005 09:32:15 +0000 |
| parents | 91b45e7531ea |
| children | 5b94f4660d9d |
line wrap: on
line diff
--- a/src/eval.c Wed May 25 22:46:48 2005 +0000 +++ b/src/eval.c Thu May 26 09:32:15 2005 +0000 @@ -2292,7 +2292,7 @@ enum run_hooks_condition)); DEFUN ("run-hooks", Frun_hooks, Srun_hooks, 0, MANY, 0, - doc: /* Run each hook in HOOKS. Major mode functions use this. + doc: /* Run each hook in HOOKS. Each argument should be a symbol, a hook variable. These symbols are processed in the order specified. If a hook symbol has a non-nil value, that value may be a function @@ -2300,6 +2300,9 @@ If the value is a function, it is called with no arguments. If it is a list, the elements are called, in order, with no arguments. +Major modes should not use this function directly to run their mode +hook; they should use `run-mode-hooks' instead. + Do not use `make-local-variable' to make a hook variable buffer-local. Instead, use `add-hook' and specify t for the LOCAL argument. usage: (run-hooks &rest HOOKS) */)
