aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlenn Morris2012-09-28 09:02:31 -0700
committerGlenn Morris2012-09-28 09:02:31 -0700
commite61d39cddfd015032a6419ce75c36ecdf1e9fe9f (patch)
treef1f941a206a079e9a7b2813dc2f7479c2ba05495 /src
parent3df749b0f8a97c8b8f18a34bce494fd9d4fe987f (diff)
parent147c0425024ce9c1dbb7301300867d8563a6730a (diff)
downloademacs-e61d39cddfd015032a6419ce75c36ecdf1e9fe9f.tar.gz
emacs-e61d39cddfd015032a6419ce75c36ecdf1e9fe9f.zip
Merge from emacs-24; up to 2012-05-07T21:26:08Z!rgm@gnu.org
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 92ab8080c9d..c30c4ed955b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12012-09-28 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-28 Eli Zaretskii <eliz@gnu.org> 62012-09-28 Eli Zaretskii <eliz@gnu.org>
2 7
3 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from 8 * xdisp.c (syms_of_xdisp) <Qredisplay_internal>: Rename from
diff --git a/src/eval.c b/src/eval.c
index d984331ec41..851b2bb1129 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2351,14 +2351,10 @@ usage: (run-hooks &rest HOOKS) */)
2351DEFUN ("run-hook-with-args", Frun_hook_with_args, 2351DEFUN ("run-hook-with-args", Frun_hook_with_args,
2352 Srun_hook_with_args, 1, MANY, 0, 2352 Srun_hook_with_args, 1, MANY, 0,
2353 doc: /* Run HOOK with the specified arguments ARGS. 2353 doc: /* Run HOOK with the specified arguments ARGS.
2354HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2354HOOK should be a symbol, a hook variable. The value of HOOK
2355value, that value may be a function or a list of functions to be 2355may be nil, a function, or a list of functions. Call each
2356called to run the hook. If the value is a function, it is called with 2356function in order with arguments ARGS. The final return value
2357the given arguments and its return value is returned. If it is a list 2357is unspecified.
2358of functions, those functions are called, in order,
2359with the given arguments ARGS.
2360It is best not to depend on the value returned by `run-hook-with-args',
2361as that may change.
2362 2358
2363Do not use `make-local-variable' to make a hook variable buffer-local. 2359Do not use `make-local-variable' to make a hook variable buffer-local.
2364Instead, use `add-hook' and specify t for the LOCAL argument. 2360Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2368,18 +2364,18 @@ usage: (run-hook-with-args HOOK &rest ARGS) */)
2368 return run_hook_with_args (nargs, args, funcall_nil); 2364 return run_hook_with_args (nargs, args, funcall_nil);
2369} 2365}
2370 2366
2367/* NB this one still documents a specific non-nil return value.
2368 (As did run-hook-with-args and run-hook-with-args-until-failure
2369 until they were changed in 24.1.) */
2371DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success, 2370DEFUN ("run-hook-with-args-until-success", Frun_hook_with_args_until_success,
2372 Srun_hook_with_args_until_success, 1, MANY, 0, 2371 Srun_hook_with_args_until_success, 1, MANY, 0,
2373 doc: /* Run HOOK with the specified arguments ARGS. 2372 doc: /* Run HOOK with the specified arguments ARGS.
2374HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2373HOOK should be a symbol, a hook variable. The value of HOOK
2375value, that value may be a function or a list of functions to be 2374may be nil, a function, or a list of functions. Call each
2376called to run the hook. If the value is a function, it is called with 2375function in order with arguments ARGS, stopping at the first
2377the given arguments and its return value is returned. 2376one that returns non-nil, and return that value. Otherwise (if
2378If it is a list of functions, those functions are called, in order, 2377all functions return nil, or if there are no functions to call),
2379with the given arguments ARGS, until one of them 2378return nil.
2380returns a non-nil value. Then we return that value.
2381However, if they all return nil, we return nil.
2382If the value of HOOK is nil, this function returns nil.
2383 2379
2384Do not use `make-local-variable' to make a hook variable buffer-local. 2380Do not use `make-local-variable' to make a hook variable buffer-local.
2385Instead, use `add-hook' and specify t for the LOCAL argument. 2381Instead, use `add-hook' and specify t for the LOCAL argument.
@@ -2398,15 +2394,12 @@ funcall_not (ptrdiff_t nargs, Lisp_Object *args)
2398DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure, 2394DEFUN ("run-hook-with-args-until-failure", Frun_hook_with_args_until_failure,
2399 Srun_hook_with_args_until_failure, 1, MANY, 0, 2395 Srun_hook_with_args_until_failure, 1, MANY, 0,
2400 doc: /* Run HOOK with the specified arguments ARGS. 2396 doc: /* Run HOOK with the specified arguments ARGS.
2401HOOK should be a symbol, a hook variable. If HOOK has a non-nil 2397HOOK should be a symbol, a hook variable. The value of HOOK
2402value, that value may be a function or a list of functions to be 2398may be nil, a function, or a list of functions. Call each
2403called to run the hook. If the value is a function, it is called with 2399function in order with arguments ARGS, stopping at the first
2404the given arguments. Then we return nil if the function returns nil, 2400one that returns nil, and return nil. Otherwise (if all functions
2405and t if it returns non-nil. 2401return non-nil, or if there are no functions to call), return non-nil
2406If it is a list of functions, those functions are called, in order, 2402\(do not rely on the precise return value in this case).
2407with the given arguments ARGS, until one of them returns nil.
2408Then we return nil. However, if they all return non-nil, we return t.
2409If the value of HOOK is nil, this function returns t.
2410 2403
2411Do not use `make-local-variable' to make a hook variable buffer-local. 2404Do not use `make-local-variable' to make a hook variable buffer-local.
2412Instead, use `add-hook' and specify t for the LOCAL argument. 2405Instead, use `add-hook' and specify t for the LOCAL argument.