diff options
| author | Glenn Morris | 2012-09-17 21:07:13 -0400 |
|---|---|---|
| committer | Glenn Morris | 2012-09-17 21:07:13 -0400 |
| commit | 1e9bbf473bd60c3a423028640b48eb14d263c451 (patch) | |
| tree | 29bf0a2a513395e5048ab27a15046fbd20ac12f9 | |
| parent | 2bc9406c23a1b2962fcecc7fd1451b4c96e49c49 (diff) | |
| download | emacs-1e9bbf473bd60c3a423028640b48eb14d263c451.tar.gz emacs-1e9bbf473bd60c3a423028640b48eb14d263c451.zip | |
run-hooks-with-args-* do fixes (bug#12393)
* src/eval.c (Frun_hook_with_args_until_success)
(Frun_hook_with_args_until_failure): Doc fixes.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/eval.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 0834ab9111e..2b23ff7e9c2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-09-18 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * eval.c (Frun_hook_with_args_until_success) | ||
| 4 | (Frun_hook_with_args_until_failure): Doc fixes. (Bug#12393) | ||
| 5 | |||
| 1 | 2012-09-14 Andreas Schwab <schwab@linux-m68k.org> | 6 | 2012-09-14 Andreas Schwab <schwab@linux-m68k.org> |
| 2 | 7 | ||
| 3 | * fileio.c (Ffile_selinux_context): Only call freecon when | 8 | * fileio.c (Ffile_selinux_context): Only call freecon when |
diff --git a/src/eval.c b/src/eval.c index a2df5bfcff5..332c3326fce 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2579,6 +2579,7 @@ If it is a list of functions, those functions are called, in order, | |||
| 2579 | with the given arguments ARGS, until one of them | 2579 | with the given arguments ARGS, until one of them |
| 2580 | returns a non-nil value. Then we return that value. | 2580 | returns a non-nil value. Then we return that value. |
| 2581 | However, if they all return nil, we return nil. | 2581 | However, if they all return nil, we return nil. |
| 2582 | If the value of HOOK is nil, this function returns nil. | ||
| 2582 | 2583 | ||
| 2583 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2584 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2584 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2585 | Instead, use `add-hook' and specify t for the LOCAL argument. |
| @@ -2600,10 +2601,12 @@ DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, | |||
| 2600 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil | 2601 | HOOK should be a symbol, a hook variable. If HOOK has a non-nil |
| 2601 | value, that value may be a function or a list of functions to be | 2602 | value, that value may be a function or a list of functions to be |
| 2602 | called to run the hook. If the value is a function, it is called with | 2603 | called to run the hook. If the value is a function, it is called with |
| 2603 | the given arguments and its return value is returned. | 2604 | the given arguments. Then we return nil if the function returns nil, |
| 2605 | and t if it returns non-nil. | ||
| 2604 | If it is a list of functions, those functions are called, in order, | 2606 | If it is a list of functions, those functions are called, in order, |
| 2605 | with the given arguments ARGS, until one of them returns nil. | 2607 | with the given arguments ARGS, until one of them returns nil. |
| 2606 | Then we return nil. However, if they all return non-nil, we return non-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. | ||
| 2607 | 2610 | ||
| 2608 | Do not use `make-local-variable' to make a hook variable buffer-local. | 2611 | Do not use `make-local-variable' to make a hook variable buffer-local. |
| 2609 | Instead, use `add-hook' and specify t for the LOCAL argument. | 2612 | Instead, use `add-hook' and specify t for the LOCAL argument. |