From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gg44060@mail.com Newsgroups: gmane.emacs.help Subject: Re: backward-delete-word function (not backward-kill-word) Date: 26 Feb 2004 07:31:10 -0800 Organization: http://groups.google.com Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1077810427 21573 80.91.224.253 (26 Feb 2004 15:47:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2004 15:47:07 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 26 16:47:02 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AwNj3-0003gA-00 for ; Thu, 26 Feb 2004 16:47:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AwNiH-0005zn-3O for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Feb 2004 10:46:13 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.glorb.com!postnews1.google.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 33 Original-NNTP-Posting-Host: 202.88.225.118 Original-X-Trace: posting.google.com 1077809470 7629 127.0.0.1 (26 Feb 2004 15:31:10 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 26 Feb 2004 15:31:10 +0000 (UTC) Original-Xref: shelby.stanford.edu gnu.emacs.help:121281 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17235 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17235 "Ehud Karni" wrote in message news:... > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 24 Feb 2004 21:19:44 -0800, gg44060(at)mail.com wrote: > > > > Is there a backward-delete-word funtion in emacs? It is very annoying > > to have the words deleted during a find-file to show up on the kill > > ring [snip ] > > > > I tried defining it as a keyboard macro using delete-region, but of > > course it doesn't work in the mini-buffer. > > Just copy the `kill-word' and `backward-kill-word' functions (from > simple.el) and replace the string "kill" by "delete" like this: > > (defun delete-word (arg) > "Delete characters forward until encountering the end of a word. > With argument, do this that many times." > (interactive "p") > (delete-region (point) (progn (forward-word arg) (point)))) > > (defun backward-delete-word (arg) > "Delete characters backward until encountering the end of a word. > With argument, do this that many times." > (interactive "p") > (delete-word (- arg))) > > Assign (globally) keys to these functions and enjoy it. Thanks! This is exactly what I was looking for and it works like a charm! I hope to get the full sources installed for emacs once the download site starts working again.