[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108143: run-hooks-with-args-*
From: |
Stefan Monnier |
Subject: |
Re: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108143: run-hooks-with-args-* do fixes (bug#12393) |
Date: |
Tue, 18 Sep 2012 00:10:16 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) |
> with the given arguments ARGS, until one of them
> returns a non-nil value. Then we return that value.
> However, if they all return nil, we return nil.
> +If the value of HOOK is nil, this function returns nil.
That seems redundant, since if the hook is nil, all the functions on the
hook return nil.
> -the given arguments and its return value is returned.
> +the given arguments. Then we return nil if the function returns nil,
> +and t if it returns non-nil.
Let's not force ourselves to return t. IOW `non-nil' would be better.
> If it is a list of functions, those functions are called, in order,
> with the given arguments ARGS, until one of them returns nil.
> -Then we return nil. However, if they all return non-nil, we return non-nil.
> +Then we return nil. However, if they all return non-nil, we return t.
> +If the value of HOOK is nil, this function returns t.
Again here specifying t instead of `non-nil' is a bad idea.
Stefan