From 9f685258681faec407791bd4b93af7cd46b04ba1 Mon Sep 17 00:00:00 2001 From: Lute Kamstra Date: Thu, 26 May 2005 09:32:15 +0000 Subject: [PATCH] (Frun_hooks): Mention run-mode-hooks in docstring. --- src/eval.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/eval.c b/src/eval.c index 7f043daa555..8bb201c5df5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -2292,7 +2292,7 @@ static Lisp_Object run_hook_with_args P_ ((int, Lisp_Object *, 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 @@ or a list of functions to be called to run the hook. 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) */) -- 2.39.5