From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5586 invoked from network); 23 Mar 2007 15:40:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.8 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 23 Mar 2007 15:40:13 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 13755 invoked from network); 23 Mar 2007 15:40:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 15:40:07 -0000 Received: (qmail 17309 invoked by alias); 23 Mar 2007 15:40:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23233 Received: (qmail 17294 invoked from network); 23 Mar 2007 15:40:02 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 23 Mar 2007 15:40:02 -0000 Received: (qmail 13024 invoked from network); 23 Mar 2007 15:40:02 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 23 Mar 2007 15:39:53 -0000 Received: from torch.brasslantern.com ([71.116.70.212]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JFD00EGA4TNXEH3@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Fri, 23 Mar 2007 10:39:29 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id l2NFdCAF013890 for ; Fri, 23 Mar 2007 08:39:13 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id l2NFdCSY013889 for zsh-workers@sunsite.dk; Fri, 23 Mar 2007 08:39:12 -0700 Date: Fri, 23 Mar 2007 08:39:12 -0700 From: Bart Schaefer Subject: Re: PATCH: minor module tweak In-reply-to: <200703231418.l2NEIjGi001132@news01.csr.com> To: zsh-workers@sunsite.dk Message-id: <070323083912.ZM13888@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <200703231418.l2NEIjGi001132@news01.csr.com> Comments: In reply to Peter Stephenson "PATCH: minor module tweak" (Mar 23, 2:18pm) On Mar 23, 2:18pm, Peter Stephenson wrote: } } While playing about with zmodload I noted that a failed zmodload } doesn't flag an error, so you can use it as a test for module } availability. I've interpreted this as a feature and documented it. It's certainly been used this way ever since the -i flag was added; e.g. in zfinit: zmodload -i zsh/net/tcp || return 1 So it's fine that you documented this, but I think it was implicit all along in the phrase "prints an error message and returns a non-zero status." (If it were going to abort the code block, it couldn't return a status, could it?) There are a few places in Functions/**/*(.) where the "|| return 1" could helpfully to be appended to a "zmodload -i" that currently just assumes it will succeed.