zsh-workers
 help / color / mirror / code / Atom feed
From: Gary Oberbrunner <garyo@genarts.com>
To: zsh-workers@sunsite.dk
Cc: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
Subject: Re: Zsh 4.0.4 and Emacs 21.1 in Windows XP
Date: Fri, 23 Nov 2001 17:09:38 -0500	[thread overview]
Message-ID: <3BFEC922.8040606@genarts.com> (raw)
In-Reply-To: <3BFE6FC3.7080503@genarts.com>

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
 };
 



  reply	other threads:[~2001-11-23 22:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-21 19:59 Gary Oberbrunner
2001-11-22 11:26 ` Borsenkow Andrej
2001-11-23  2:38   ` Gary Oberbrunner
2001-11-23  6:05     ` Borsenkow Andrej
2001-11-23 15:48       ` Gary Oberbrunner
2001-11-23 22:09         ` Gary Oberbrunner [this message]
2001-11-23 21:21   ` Gary Oberbrunner
2001-11-26  7:32     ` Borsenkow Andrej
2001-11-26 15:31       ` Gary Oberbrunner
2002-02-08 15:20   ` Gary Oberbrunner
2001-11-22 11:35 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BFEC922.8040606@genarts.com \
    --to=garyo@genarts.com \
    --cc=Andrej.Borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).