From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 520 invoked from network); 29 Mar 2001 10:19:50 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 2001 10:19:50 -0000 Received: (qmail 9452 invoked by alias); 29 Mar 2001 10:19:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13837 Received: (qmail 9441 invoked from network); 29 Mar 2001 10:19:44 -0000 Message-ID: To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: Bugs on SourceForge In-Reply-To: Your message of "Thu, 29 Mar 2001 06:53:34 -0000." <1010329065334.ZM17730@candle.brasslantern.com> Date: Thu, 29 Mar 2001 11:19:16 +0100 From: Peter Stephenson > We should at least address 219457 and 219459 before 4.0.1, not because I > submitted them, but because they're shell-crashers. The simplest way of fixing the problem of typesetting parameters before they are autoloaded is to forbid it. I can't see any time it could conceivably be useful to allow it, since the whole point of autoloaded parameters is that they get set up when they're loaded, and it's up to zmodload, not typeset, to turn off autoloading. Index: Src/builtin.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v retrieving revision 1.42 diff -u -r1.42 builtin.c --- Src/builtin.c 2001/02/14 23:36:23 1.42 +++ Src/builtin.c 2001/03/29 10:16:11 @@ -1628,10 +1628,16 @@ if ((tc = chflags && chflags != (PM_EFLOAT|PM_FFLOAT))) usepm = 0; } - if (tc && (pm->flags & PM_SPECIAL)) { - zerrnam(cname, "%s: can't change type of a special parameter", - pname, 0); - return NULL; + if (tc){ + if (pm->flags & PM_SPECIAL) { + zerrnam(cname, "%s: can't change type of a special parameter", + pname, 0); + return NULL; + } else if (pm->flags & PM_AUTOLOAD) { + zerrnam(cname, "%s: can't change type of autoloaded parameter", + pname, 0); + return NULL; + } } /* -- Peter Stephenson Software Engineer CSR Ltd., Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070