From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16696 invoked from network); 4 Feb 2003 11:15:30 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 4 Feb 2003 11:15:30 -0000 Received: (qmail 9647 invoked by alias); 4 Feb 2003 11:15:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18188 Received: (qmail 9637 invoked from network); 4 Feb 2003 11:15:21 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 4 Feb 2003 11:15:21 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 4 Feb 2003 11:15:21 -0000 Received: from exchange01.csr.com (unverified) by (Content Technologies SMTPRS 4.2.1) with ESMTP id for ; Tue, 4 Feb 2003 11:21:40 +0000 Received: from csr.com (tinky-winky.csr.com [192.168.144.127]) by exchange01.csr.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id DQ47KZZZ; Tue, 4 Feb 2003 11:13:17 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: PATCH: regurgitated case parentheses In-reply-to: ""Bart Schaefer""'s message of "Tue, 04 Feb 2003 09:18:32 GMT." <1030204091832.ZM15610@candle.brasslantern.com> Date: Tue, 04 Feb 2003 11:15:22 +0000 Message-ID: <3339.1044357322@csr.com> From: Peter Stephenson "Bart Schaefer" wrote: > Just watch out for what happens if you ever have unbalanced parentheses in > the content of the here-document. Apropos of which, I've been thinking for a while that % fn() { case foo in (bar) print yes;; ((a|b)) print no;; esac; } % functions fn fn () { case foo in bar) print yes ;; (a|b)) print no ;; esac } is suboptimal. The following patch puts in a balanced leading parenthesis. Index: Src/text.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/text.c,v retrieving revision 1.12 diff -u -r1.12 text.c --- Src/text.c 13 Nov 2002 21:09:07 -0000 1.12 +++ Src/text.c 4 Feb 2003 11:14:37 -0000 @@ -521,6 +521,7 @@ taddnl(); else taddchr(' '); + taddstr("("); code = *state->pc++; taddstr(ecgetstr(state, EC_NODUP, NULL)); state->pc++; @@ -537,6 +538,7 @@ taddnl(); else taddchr(' '); + taddstr("("); code = *state->pc++; taddstr(ecgetstr(state, EC_NODUP, NULL)); state->pc++; -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************