all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: emacs-devel@gnu.org
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	[thread overview]
Message-ID: <jwvvcfc563g.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <E1TDmRM-0004cr-78@vcs.savannah.gnu.org> (Glenn Morris's message of "Mon, 17 Sep 2012 21:07:13 -0400")

>  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



       reply	other threads:[~2012-09-18  4:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <E1TDmRM-0004cr-78@vcs.savannah.gnu.org>
2012-09-18  4:10 ` Stefan Monnier [this message]
2012-09-18  6:37   ` [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108143: run-hooks-with-args-* do fixes (bug#12393) Eli Zaretskii
2012-09-18  6:55     ` Glenn Morris
2012-09-18 14:20     ` [Emacs-diffs] /srv/bzr/emacs/emacs-24r108143: " Drew Adams
2012-09-18 14:29       ` Eli Zaretskii
2012-09-18 15:20         ` Andreas Schwab
2012-09-18  6:49   ` [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108143: " Glenn Morris
2012-09-18 12:27     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvvcfc563g.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rgm@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.