diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/eval.c | 45 |
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 @@ | |||
| 1 | 2012-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 | |||
| 1 | 2012-09-21 Chong Yidong <cyd@gnu.org> | 6 | 2012-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) */) | |||
| 2551 | DEFUN ("run-hook-with-args", Frun_hook_with_args, | 2551 | DEFUN ("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. |
| 2554 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | 2554 | HOOK should be a symbol, a hook variable. The value of HOOK |
| 2555 | value, that value may be a function or a list of functions to be | 2555 | may be nil, a function, or a list of functions. Call each |
| 2556 | called to run the hook. If the value is a function, it is called with | 2556 | function in order with arguments ARGS. The final return value |
| 2557 | the given arguments and its return value is returned. If it is a list | 2557 | is unspecified. |
| 2558 | of functions, those functions are called, in order, | ||
| 2559 | with the given arguments ARGS. | ||
| 2560 | It is best not to depend on the value returned by `run-hook-with-args', | ||
| 2561 | as that may change. | ||
| 2562 | 2558 | ||
| 2563 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2559 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2564 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2560 | Instead, 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.) */ | ||
| 2571 | DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, | 2570 | DEFUN ("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. |
| 2574 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | 2573 | HOOK should be a symbol, a hook variable. The value of HOOK |
| 2575 | value, that value may be a function or a list of functions to be | 2574 | may be nil, a function, or a list of functions. Call each |
| 2576 | called to run the hook. If the value is a function, it is called with | 2575 | function in order with arguments ARGS, stopping at the first |
| 2577 | the given arguments and its return value is returned. | 2576 | one that returns non-nil, and return that value. Otherwise (if |
| 2578 | If it is a list of functions, those functions are called, in order, | 2577 | all functions return nil, or if there are no functions to call), |
| 2579 | with the given arguments ARGS, until one of them | 2578 | return nil. |
| 2580 | returns a non-nil value. Then we return that value. | ||
| 2581 | However, if they all return nil, we return nil. | ||
| 2582 | If the value of HOOK is nil, this function returns nil. | ||
| 2583 | 2579 | ||
| 2584 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2580 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2585 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2581 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| @@ -2598,15 +2594,12 @@ funcall_not (ptrdiff_t nargs, Lisp_Object *args) | |||
| 2598 | DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, | 2594 | DEFUN ("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. |
| 2601 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | 2597 | HOOK should be a symbol, a hook variable. The value of HOOK |
| 2602 | value, that value may be a function or a list of functions to be | 2598 | may be nil, a function, or a list of functions. Call each |
| 2603 | called to run the hook. If the value is a function, it is called with | 2599 | function in order with arguments ARGS, stopping at the first |
| 2604 | the given arguments. Then we return nil if the function returns nil, | 2600 | one that returns nil, and return nil. Otherwise (if all functions |
| 2605 | and t if it returns non-nil. | 2601 | return non-nil, or if there are no functions to call), return non-nil |
| 2606 | If it is a list of functions, those functions are called, in order, | 2602 | \(do not rely on the precise return value in this case). |
| 2607 | with the given arguments ARGS, until one of them returns nil. | ||
| 2608 | Then we return nil. However, if they all return non-nil, we return t. | ||
| 2609 | If the value of HOOK is nil, this function returns t. | ||
| 2610 | 2603 | ||
| 2611 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2604 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2612 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2605 | Instead, use `add-hook' and specify t for the LOCAL argument. |