From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26264 invoked from network); 25 Jul 2005 09:36:41 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jul 2005 09:36:41 -0000 Received: (qmail 65664 invoked from network); 25 Jul 2005 09:36:35 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 09:36:35 -0000 Received: (qmail 12643 invoked by alias); 25 Jul 2005 09:36:32 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21522 Received: (qmail 12634 invoked from network); 25 Jul 2005 09:36:32 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2005 09:36:32 -0000 Received: (qmail 65317 invoked from network); 25 Jul 2005 09:36:32 -0000 Received: from mailhost1.csr.com (HELO MAILSWEEPER01.csr.com) (81.105.217.43) by a.mx.sunsite.dk with SMTP; 25 Jul 2005 09:36:27 -0000 Received: from exchange03.csr.com (unverified [10.100.137.60]) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Mon, 25 Jul 2005 10:34:22 +0100 Received: from news01.csr.com ([10.103.143.38]) by exchange03.csr.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 25 Jul 2005 10:38:40 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.1/8.12.11) with ESMTP id j6P9aWD2005455 for ; Mon, 25 Jul 2005 10:36:32 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.1/8.13.1/Submit) with ESMTP id j6P9aVAR005452 for ; Mon, 25 Jul 2005 10:36:31 +0100 Message-Id: <200507250936.j6P9aVAR005452@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: PATCH: Re: Implementation of simple newuser module (how to start?) In-reply-to: <1050723051057.ZM10317@candle.brasslantern.com> References: <200507201401.j6KE1k5i004733@news01.csr.com> <200507201804.j6KI474K004991@news01.csr.com> <1050723051057.ZM10317@candle.brasslantern.com> Date: Mon, 25 Jul 2005 10:36:31 +0100 From: Peter Stephenson X-OriginalArrivalTime: 25 Jul 2005 09:38:40.0442 (UTC) FILETIME=[A3D041A0:01C590FC] X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 Bart Schaefer wrote: > } +autoload -U zsh-install-newuser > } +zsh-install-newuser > > I suggest that instead this be: > > autoload -U +X zsh-install-newuser && zsh-install-newuser > > That is, don't execute the function if it can't be autoloaded, and don't > redefine it if it is already defined. But autoload +X returns false if the function was already defined, so it wouldn't execute the function in that case. I have belatedly realised that zsh-newuser-install would probably be a better name, since if the function gets split up into smaller functions it gives a namespace. -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. **********************************************************************