Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle_refresh trial patch (and unrelated bug)

(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);
+ 	add(Dnull);
  	c = dquote_parse(')', 0);
+ 	add(Dnull);
  	if (c || (c = hgetc()) != ')') {

Peter Stephenson <pws@xxxxxx>       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.

Messages sorted by: Reverse Date, Date, Thread, Author