From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Ehud Karni" Newsgroups: gmane.emacs.help Subject: Re: backward-delete-word function (not backward-kill-word) Date: Wed, 25 Feb 2004 11:33:09 +0200 Organization: Mivtach-Simon Insurance agencies Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <200402250933.i1P9X9VQ014784@beta.mvs.co.il> References: Reply-To: ehud@unix.mvs.co.il NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8-i Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1077701757 984 80.91.224.253 (25 Feb 2004 09:35:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Feb 2004 09:35:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Feb 25 10:35:52 2004 Return-path: Original-Received: from hermes.netfonds.no ([80.91.224.195]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AvvSJ-00019Q-00 for ; Wed, 25 Feb 2004 10:35:52 +0100 Original-Received: from monty-python.gnu.org (monty-python.gnu.org [199.232.76.173]) by hermes.netfonds.no (8.12.8p1/8.12.8) with ESMTP id i1P9ZNOo023427 for ; Wed, 25 Feb 2004 10:35:24 +0100 (CET) Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvvRZ-0000Q5-JM for geh-help-gnu-emacs@m.gmane.org; Wed, 25 Feb 2004 04:35:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AvvQc-0008Of-K2 for help-gnu-emacs@gnu.org; Wed, 25 Feb 2004 04:34:06 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AvvPu-0007qq-RW for help-gnu-emacs@gnu.org; Wed, 25 Feb 2004 04:33:54 -0500 Original-Received: from [192.114.178.12] (helo=unix.mvs.co.il) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AvvPr-0007ll-HZ for help-gnu-emacs@gnu.org; Wed, 25 Feb 2004 04:33:19 -0500 Original-Received: from beta.mvs.co.il (beta [10.253.0.3]) by unix.mvs.co.il (8.12.10/8.12.10) with ESMTP id i1P9XAXn020385 for ; Wed, 25 Feb 2004 11:33:10 +0200 Original-Received: from beta.mvs.co.il (localhost [127.0.0.1]) by beta.mvs.co.il (8.12.10/8.12.10) with ESMTP id i1P9XAh3014803 for ; Wed, 25 Feb 2004 11:33:10 +0200 Original-Received: (from root@localhost) by beta.mvs.co.il (8.12.10/8.12.10/Submit) id i1P9X9VQ014784; Wed, 25 Feb 2004 11:33:09 +0200 Original-To: gg44060@mail.com In-reply-to: (gg44060@mail.com) X-Mailer: Emacs 21.3.1 rmail (send-msg 1.108) 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:17192 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17192 -----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. Ehud. - -- Ehud Karni Tel: +972-3-7966-561 /"\ Mivtach - Simon Fax: +972-3-7966-667 \ / ASCII Ribbon Campaign Insurance agencies (USA) voice mail and X Against HTML Mail http://www.mvs.co.il FAX: 1-815-5509341 / \ GnuPG: 98EA398D Better Safe Than Sorry -----BEGIN PGP SIGNATURE----- Comment: use http://www.keyserver.net/ to get my key (and others) iD8DBQFAPGvULFvTvpjqOY0RAjYXAJ9/5QFvX6iAqJQOqSPKC5oGP47uiQCeOo42 cPptUBIghmv4OItNr+88aKs= =RdWh -----END PGP SIGNATURE-----