From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel 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 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1347941427 10902 80.91.229.3 (18 Sep 2012 04:10:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 18 Sep 2012 04:10:27 +0000 (UTC) Cc: emacs-devel@gnu.org To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 18 06:10:31 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TDp8l-0004BY-FI for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2012 06:10:27 +0200 Original-Received: from localhost ([::1]:43522 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDp8h-0007LI-1T for ged-emacs-devel@m.gmane.org; Tue, 18 Sep 2012 00:10:23 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDp8e-0007LD-HI for emacs-devel@gnu.org; Tue, 18 Sep 2012 00:10:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDp8d-0003oV-1E for emacs-devel@gnu.org; Tue, 18 Sep 2012 00:10:20 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:13986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDp8c-0003nD-Sl; Tue, 18 Sep 2012 00:10:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09Ld+qU/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="198570731" Original-Received: from 75-119-234-148.dsl.teksavvy.com (HELO pastel.home) ([75.119.234.148]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 18 Sep 2012 00:10:17 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0CC0E59041; Tue, 18 Sep 2012 00:10:16 -0400 (EDT) In-Reply-To: (Glenn Morris's message of "Mon, 17 Sep 2012 21:07:13 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153371 Archived-At: > 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