From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12528 invoked from network); 23 Nov 2001 22:09:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 23 Nov 2001 22:09:36 -0000 Received: (qmail 2878 invoked by alias); 23 Nov 2001 22:09:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16287 Received: (qmail 2867 invoked from network); 23 Nov 2001 22:09:31 -0000 Message-ID: <3BFEC922.8040606@genarts.com> Date: Fri, 23 Nov 2001 17:09:38 -0500 From: Gary Oberbrunner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.6) Gecko/20011120 X-Accept-Language: en-us MIME-Version: 1.0 To: zsh-workers@sunsite.dk CC: Borsenkow Andrej Subject: Re: Zsh 4.0.4 and Emacs 21.1 in Windows XP References: <000001c173e4$dbc3bb20$21c9ca95@mow.siemens.ru> <3BFE6FC3.7080503@genarts.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I don't know if anyone cares, but I just created this patch, which *does* work for me. Nothing else I tried seemed to do it. It adds a new option, emacscygwinhack, which deletes any CR at the end of a line (it works analogously to sunkeyboardhack). Feel free to come up with a better name for it if you find it at all useful. Andrej: I tried everything I could with CYGWIN, and had no luck at all. Maybe it's just me though. -- Gary Oberbrunner --- input.c.~1~ Tue Jan 16 08:44:20 2001 +++ input.c Fri Nov 23 14:18:57 2001 @@ -294,6 +294,16 @@ ptr[-1] = '\0'; } } + if (*ingetcline && ingetcline[strlen(ingetcline) - 1] == '\n' && + ingetcline[strlen(ingetcline) - 2] == '\r' && + interact && isset(EMACSCYGWINHACK) && isset(SHINSTDIN) && + SHTTY != -1) { + /* Junk an unmatched CR at the end of the line. */ + int ct; + char *ptr = &ingetcline[strlen(ingetcline)-2]; + *ptr++ = '\n'; + *ptr = '\0'; + } isfirstch = 1; /* Put this into the input channel. */ inputsetline(ingetcline, INP_FREE); --- options.c.~1~ Mon Jun 25 13:31:20 2001 +++ options.c Fri Nov 23 14:23:15 2001 @@ -106,6 +106,7 @@ {NULL, "cshjunkiequotes", OPT_EMULATE|OPT_CSH, CSHJUNKIEQUOTES}, {NULL, "cshnullcmd", OPT_EMULATE|OPT_CSH, CSHNULLCMD}, {NULL, "cshnullglob", OPT_EMULATE|OPT_CSH, CSHNULLGLOB}, +{NULL, "emacscygwinhack", 0, EMACSCYGWINHACK}, {NULL, "equals", OPT_EMULATE|OPT_ZSH, EQUALS}, {NULL, "errexit", OPT_EMULATE, ERREXIT}, {NULL, "exec", OPT_ALL, EXECOPT}, --- zsh.h.~1~ Mon Jun 25 13:31:20 2001 +++ zsh.h Fri Nov 23 14:22:46 2001 @@ -1441,6 +1441,7 @@ XTRACE, USEZLE, DVORAK, + EMACSCYGWINHACK, OPT_SIZE };