From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Newsgroups: gmane.emacs.help Subject: Re: kill-region defadvice Date: Sun, 8 Jun 2008 18:23:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <298c594c-9af1-4456-b113-5ec715387c80@26g2000hsk.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1212975648 4892 80.91.229.12 (9 Jun 2008 01:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 9 Jun 2008 01:40:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jun 09 03:41:30 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1K5WNt-00052t-5i for geh-help-gnu-emacs@m.gmane.org; Mon, 09 Jun 2008 03:41:21 +0200 Original-Received: from localhost ([127.0.0.1]:59108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K5WN6-0006Fy-2h for geh-help-gnu-emacs@m.gmane.org; Sun, 08 Jun 2008 21:40:32 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!26g2000hsk.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 20 Original-NNTP-Posting-Host: 98.169.3.157 Original-X-Trace: posting.google.com 1212974604 28817 127.0.0.1 (9 Jun 2008 01:23:24 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 9 Jun 2008 01:23:24 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 26g2000hsk.googlegroups.com; posting-host=98.169.3.157; posting-account=ZyfIlgoAAADvwmSv7gUPoyt-iOc2yu_g User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 indian.schafers.us:800 (squid/2.6.STABLE17) Original-Xref: news.stanford.edu gnu.emacs.help:159273 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:54632 Archived-At: On Jun 8, 5:18 pm, Barry Margolin wrote: > I assume you only want this special behavior when the command is bound > to C-w, because the "w" means "word" to you (was this the kill-word > command in some other editor you've used in the past?). But if you use > defadvice, your advice will be obeyed even if the command were on some > other key. Or if a function used (call-interactively 'kill-region). > > So I think it would be better to write a new function, and bind C-w to > that. I like C-w because it's easy to type and works in a bash shell. Thanks for all the tips, I understand the potential usability problems, so I think I'll stick with writing an extra function and binding that to C-w. Cheers, Joe