aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/eval.c45
2 files changed, 24 insertions, 26 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 15b47934424..96546df6638 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-09-24 Glenn Morris <rgm@gnu.org>
2
3 * eval.c (Frun_hook_with_args, Frun_hook_with_args_until_success)
4 (Frun_hook_with_args_until_failure): Doc fixes.
5
12012-09-21 Chong Yidong <cyd@gnu.org> 62012-09-21 Chong Yidong <cyd@gnu.org>
2 7
3 * image.c (define_image_type): Avoid adding duplicate types to 8 * image.c (define_image_type): Avoid adding duplicate types to
diff --git a/src/eval.c b/src/eval.c
index 332c3326fce..f6056e33c28 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2551,14 +2551,10 @@ usage: (run-hooks &rest HOOKS) */)
2551DEFUN ("run-hook-with-args", Frun_hook_with_args, 2551DEFUN ("run-hook-with-args", Frun_hook_with_args,
2552 Srun_hook_with_args, 1, MANY, 0, 2552 Srun_hook_with_args, 1, MANY, 0,
2553 doc: /* Run HOOK with the specified arguments ARGS. 2553 doc: /* Run HOOK with the specified arguments ARGS.
2554HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2554HOOK should be a symbol, a hook variable. The value of HOOK
2555value, that value may be a function or a list of functions to be 2555may be nil, a function, or a list of functions. Call each
2556called to run the hook. If the value is a function, it is called with 2556function in order with arguments ARGS. The final return value
2557the given arguments and its return value is returned. If it is a list 2557is unspecified.
2558of functions, those functions are called, in order,
2559with the given arguments ARGS.
2560It is best not to depend on the value returned by `run-hook-with-args',
2561as that may change.
2562 2558
2563Do not use `make-local-variable' to make a hook variable buffer-local. 2559Do not use `make-local-variable' to make a hook variable buffer-local.
2564Instead, use `add-hook' and specify t for the LOCAL argument. 2560Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2568,18 +2564,18 @@ usage: (run-hook-with-args HOOK &rest ARGS) */)
2568 return run_hook_with_args (nargs, args, funcall_nil); 2564 return run_hook_with_args (nargs, args, funcall_nil);
2569} 2565}
2570 2566
2567/* NB this one still documents a specific non-nil return value.
2568 (As did run-hook-with-args and run-hook-with-args-until-failure
2569 until they were changed in 24.1.) */
2571DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, 2570DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success,
2572 Srun_hook_with_args_until_success, 1, MANY, 0, 2571 Srun_hook_with_args_until_success, 1, MANY, 0,
2573 doc: /* Run HOOK with the specified arguments ARGS. 2572 doc: /* Run HOOK with the specified arguments ARGS.
2574HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2573HOOK should be a symbol, a hook variable. The value of HOOK
2575value, that value may be a function or a list of functions to be 2574may be nil, a function, or a list of functions. Call each
2576called to run the hook. If the value is a function, it is called with 2575function in order with arguments ARGS, stopping at the first
2577the given arguments and its return value is returned. 2576one that returns non-nil, and return that value. Otherwise (if
2578If it is a list of functions, those functions are called, in order, 2577all functions return nil, or if there are no functions to call),
2579with the given arguments ARGS, until one of them 2578return nil.
2580returns a non-nil value. Then we return that value.
2581However, if they all return nil, we return nil.
2582If the value of HOOK is nil, this function returns nil.
2583 2579
2584Do not use `make-local-variable' to make a hook variable buffer-local. 2580Do not use `make-local-variable' to make a hook variable buffer-local.
2585Instead, use `add-hook' and specify t for the LOCAL argument. 2581Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2598,15 +2594,12 @@ funcall_not (ptrdiff_t nargs, Lisp_Object *args)
2598DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, 2594DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure,
2599 Srun_hook_with_args_until_failure, 1, MANY, 0, 2595 Srun_hook_with_args_until_failure, 1, MANY, 0,
2600 doc: /* Run HOOK with the specified arguments ARGS. 2596 doc: /* Run HOOK with the specified arguments ARGS.
2601HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2597HOOK should be a symbol, a hook variable. The value of HOOK
2602value, that value may be a function or a list of functions to be 2598may be nil, a function, or a list of functions. Call each
2603called to run the hook. If the value is a function, it is called with 2599function in order with arguments ARGS, stopping at the first
2604the given arguments. Then we return nil if the function returns nil, 2600one that returns nil, and return nil. Otherwise (if all functions
2605and t if it returns non-nil. 2601return non-nil, or if there are no functions to call), return non-nil
2606If it is a list of functions, those functions are called, in order, 2602\(do not rely on the precise return value in this case).
2607with the given arguments ARGS, until one of them returns nil.
2608Then we return nil. However, if they all return non-nil, we return t.
2609If the value of HOOK is nil, this function returns t.
2610 2603
2611Do not use `make-local-variable' to make a hook variable buffer-local. 2604Do not use `make-local-variable' to make a hook variable buffer-local.
2612Instead, use `add-hook' and specify t for the LOCAL argument. 2605Instead, use `add-hook' and specify t for the LOCAL argument.