From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id UAA00728 for ; Thu, 14 Nov 1996 20:06:32 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA20042; Thu, 14 Nov 1996 04:03:16 -0500 (EST) Resent-Date: Thu, 14 Nov 1996 04:03:16 -0500 (EST) Message-Id: <199611140903.KAA16132@hydra.ifh.de> X-Authentication-Warning: hydra.ifh.de: Host pws@localhost didn't use HELO protocol To: zsh-workers@math.gatech.edu Subject: Re: zle_refresh trial patch (and unrelated bug) In-reply-to: ""Bart Schaefer""'s message of "Wed, 13 Nov 1996 10:53:23 MET." <961113105323.ZM29558@candle.brasslantern.com> Date: Thu, 14 Nov 1996 10:03:34 +0100 From: Peter Stephenson Resent-Message-ID: <"VxdhX3.0.4v4.J1kYo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2405 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu (By the way, I've been getting mail fine... I've passed Bart's error on to the postmaster, but it seems you need a pretty sophisticated mailer even to see it :-)) "Bart Schaefer" wrote: > On Nov 12, 1:40pm, Peter Stephenson wrote: > } Subject: Re: zle_refresh trial patch (and unrelated bug) > } > } "Bart Schaefer" wrote: > } > builtin let fun == 0 && eval function "$var" > > So is somebody fixing this? "zed -f" ("fned") is just about completely > useless because of this bug -- almost any function edited ends up broken. > Even with Peter's patch for "==", you get `bad math expression' errors. When I posted the first message I was worried that dquote_parse() was doing something it was going to be hard to keep up with. However, since you get an immediate parse error if you include a " inside a ((...)), sticking a nulled-out "..." around the argument for recovery in text.c looks like it will do the trick. Anything more sophisticated probably needs (( to have it's own type flag in struct Cmd. This patch certainly ought to restore the previous functionality, though. Certainly seems to fix up zed -f zed. (By the way, how about adding a noflowcontrol setopt to zed? I just discovered I liked this.) (Sorrysorry... it's against 3.1 again. I don't have the luxury here of space for arbitrary versions. I really don't think that will make a difference this time.) *** Src/lex.c.dbp Thu Nov 14 09:44:46 1996 --- Src/lex.c Thu Nov 14 09:45:09 1996 *************** *** 378,384 **** --- 378,386 ---- bptr = tokstr = (char *)ncalloc(bsiz = 256); hungetc(c); cmdpush(CS_MATH); + add(Dnull); c = dquote_parse(')', 0); + add(Dnull); cmdpop(); if (c || (c = hgetc()) != ')') { hungetc(c); -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.