From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1323 invoked from network); 23 Sep 1999 02:47:08 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Sep 1999 02:47:08 -0000 Received: (qmail 6255 invoked by alias); 23 Sep 1999 02:46:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8010 Received: (qmail 6238 invoked from network); 23 Sep 1999 02:46:48 -0000 Sender: acs@ne.mediaone.net To: zsh-workers@sunsite.auc.dk Subject: Re: delete-to-char From: Vin Shelton Organization: EtherSoft, Inc References: Date: 22 Sep 1999 22:47:23 -0400 In-Reply-To: Vin Shelton's message of "20 Sep 1999 22:52:13 -0400" Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Not waiting for the bits to dry, I generated this patch. In the course of testing this, I found that M-digit did not work for me with bindkey -me, even though bindkey thinks they are bound to digit-argument. M-anydigit just beeps. "od -x" tells me that M-0 sends 0xb0, M-1 sends 0xb1, etc. Do I have my xterm/stty settings wrong, or is this a bug in zsh. ESC-digit does work, so I did manage to test this. - vin --- Src/Zle/deltochar.c.orig Wed Jun 23 08:12:25 1999 +++ Src/Zle/deltochar.c Wed Sep 22 22:24:16 1999 @@ -43,7 +43,8 @@ while (dest != ll && line[dest] != c) dest++; if (dest != ll) { - dest++; + if (n > 0) + dest++; if (!n) { forekill(dest - cs, 0); ok++; @@ -59,7 +60,7 @@ dest--; if (line[dest] == c) { if (!n) { - backkill(cs - dest, 1); + backkill(cs - dest - 1, 1); ok++; } if (dest) --- Doc/Zsh/mod_deltochar.yo.orig Tue Jun 22 04:02:49 1999 +++ Doc/Zsh/mod_deltochar.yo Wed Sep 22 22:28:37 1999 @@ -6,7 +6,7 @@ tindex(delete-to-char) item(tt(delete-to-char))( Read a character from the keyboard, and -delete from the cursor position up to and including the next +delete from the cursor position up to but not including the next (or, with repeat count var(n), the var(n)th) instance of that character. ) enditem() >>>>> On 20 Sep 1999, I wrote: Vin> OK, I'm waking up to the new world of modules and I came across the Vin> deltochar module and the delete-to-char function. I hope I'm not Vin> rehashing an old discussion, but both XEmacs (as of 21.0) and FSF Vin> Emacs (as of at least 20.4) now define zap-to-char as deleting up to Vin> but not including the specified character. It would be good, IMHO, to Vin> have delete-to-char model that functionality. Currently Vin> delete-to-char deletes up to and including the specified character. Vin> I can submit a patch if people were amenable to this change. Vin> Whaddaya think? Vin> - vin