From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1614 invoked from network); 5 Jan 2003 22:36:06 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Jan 2003 22:36:06 -0000 Received: (qmail 22298 invoked by alias); 5 Jan 2003 22:36:01 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18055 Received: (qmail 22284 invoked from network); 5 Jan 2003 22:36:00 -0000 From: "Bart Schaefer" Message-Id: <1030105223531.ZM4130@candle.brasslantern.com> Date: Sun, 5 Jan 2003 22:35:31 +0000 In-Reply-To: <20030105201312.GA2058@dman.com> Comments: In reply to Clint Adams "zsh -n and modules" (Jan 5, 3:13pm) References: <20030105201312.GA2058@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: zsh -n and modules Cc: 175467@bugs.debian.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 5, 3:13pm, Clint Adams wrote: } } If you run zsh -n on a script which uses zsh/mathfunc, zsh will } not exec zmodload, and thus not be aware of new math syntax. } Is an EXEC_ZMODLOAD option in order? That solution is not particularly useful. Consider something of the form if test ... then zmodload zsh/mathfunc fi If you can't execute the conditional because of -n, how do you know that it's safe to execute the zmodload? IMO you've identified a deeper problem, which is that no module should be allowed to alter the syntax accepted by the parser. Conversely, if the parser is able to cope with the syntax in the absence of the module, then `zsh -n' has no business complaining about the semantics. In this example: > /usr/bin/vux:766: unknown function: int `zsh -n' should simply accept that `int' IS a function, and should not try to look it up. In this case: > /usr/bin/vux:784: bad math expression: operator expected at `h' I can't give an opinion, "bad math expression" is too generic an error. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net