From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan =?iso-8859-1?Q?Reich=F6r?= Newsgroups: gmane.emacs.help Subject: Re: Kill ring and backward-kill-word Date: Thu, 15 Dec 2005 21:49:05 +0100 Organization: UTA Telekom AG (Customer) Message-ID: <874q5ajdby.fsf@utanet.at> References: <1134408189.686637.151960@g14g2000cwa.googlegroups.com> <87fyoy82lw.fsf@utanet.at> <1134498109.918119.274470@g44g2000cwa.googlegroups.com> <85mzj4mx4g.fsf@lola.goethe.zz> <1134529369.040182.310520@g43g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134684649 24587 80.91.229.2 (15 Dec 2005 22:10:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Dec 2005 22:10:49 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 15 23:10:41 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1En1H1-0000df-Vt for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Dec 2005 23:08:28 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1En1Hg-0005NL-VS for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Dec 2005 17:09:09 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!newsfeed01.chello.at!newsfeed.utanet.at!newsspool.utanet.at!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: linzu2-212-138.utaonline.at Original-X-Trace: newsreader1.utanet.at 1134679777 11188 212.152.212.138 (15 Dec 2005 20:49:37 GMT) Original-X-Complaints-To: abuse@uta.at Original-NNTP-Posting-Date: 15 Dec 2005 20:49:37 GMT User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:g3lIXo/0Wa4a1BQNyehaGKz1KIQ= Original-Xref: shelby.stanford.edu gnu.emacs.help:136333 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:31972 Archived-At: "Shug Boabby" writes: >> Well, you know M-y don't you? > > yes, but that's a pain. it's a whole extra command to do something i do > regularly. > > i never *ever* want to delete a single word and then wish to yank it > somewhere else, so i want my setup to reflect this. I just took the kill-word and the backward-kill-word functions and created versions that call delete-region instead of kill-region. (defun delete-word (arg) "Kill 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) "Kill characters backward until encountering the end of a word. With argument, do this that many times." (interactive "p") (delete-word (- arg))) With backward-delete-word you can delete the word and you don't alter the kill-ring. Stefan.