From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19064 invoked from network); 2 Sep 1999 09:27:48 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Sep 1999 09:27:48 -0000 Received: (qmail 15734 invoked by alias); 2 Sep 1999 09:27:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7627 Received: (qmail 15727 invoked from network); 2 Sep 1999 09:27:36 -0000 Message-Id: <9909020853.AA21706@ibmth.df.unipi.it> To: Zsh workers Subject: Re: Bug with _parameters and zmodload In-Reply-To: "Peter Stephenson"'s message of "Wed, 01 Sep 1999 18:09:50 DFT." <9909011609.AA21183@ibmth.df.unipi.it> Date: Thu, 02 Sep 1999 10:53:37 +0200 From: Peter Stephenson Peter Stephenson wrote: > Oliver Kiddle wrote: > > I got a number of error messages of the following form: > > > > _parameters: mapfile: autoload failed [43] > > > > I get it for each of parameters, functions, options, commands and mapfile > > This should fix this part. Hmm, after thinking some more, maybe the following is a neater fix than 7616? I don't see why you should have to autoload any module just to unset a parameter that hasn't yet been loaded, which is supposed to be what the following prevents. The (paramtab == realparamtab) test makes sure it only does the short cut for top level parameters, where we know what paramtab->getnode does; I just copied it from createparam(), where I presume it has a similar function (don't load a parameter if you're only about to hide it). --- Src/params.c.upm Mon Aug 30 16:14:05 1999 +++ Src/params.c Thu Sep 2 10:46:28 1999 @@ -1733,7 +1733,9 @@ { Param pm; - if ((pm = (Param) paramtab->getnode(paramtab, s))) + if ((pm = (Param) (paramtab == realparamtab ? + gethashnode2(paramtab, s) : + paramtab->getnode(paramtab, s)))) unsetparam_pm(pm, 0, 1); } -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy