From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: how to avoid filling KILL RING with junk Date: Wed, 18 Sep 2002 22:19:42 GMT Organization: Genuity, Woburn, MA Sender: help-gnu-emacs-admin@gnu.org Message-ID: <2_6i9.42$4C6.2134@paloalto-snr1.gtei.net> References: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1032389772 1221 127.0.0.1 (18 Sep 2002 22:56:12 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 18 Sep 2002 22:56:12 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17rnju-0000Ha-00 for ; Thu, 19 Sep 2002 00:56:10 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17rnkC-0007dG-00; Wed, 18 Sep 2002 18:56:28 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!paloalto-snf1.gtei.net!crtntx1-snh1.gtei.net!news.gtei.net!paloalto-snr1.gtei.net.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs.xemacs Mail-Copies-To: never X-Newsreader: trn 4.0-test72 (19 April 1999) Originator: barmar@genuity.net (Barry Margolin) Original-Lines: 35 Original-X-Trace: /bNDC2nu6TkPrbouTJj6Xoy/v0Q+KU5SQuKKD9w4lyVRjcy2mJQVi/rlR2afbXmK5MDLX+sIQEVj!+2Q1fVLyHtsrDBnl8JIurxnfvQNhr1yxyo3vyx0yFoQKjA5I/XpPSrGdCKg+gFOs/BmYPU+MCvuf!Eu0LY8F4smOQ3A== Original-X-Complaints-To: abuse@gte.net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly Original-NNTP-Posting-Date: Wed, 18 Sep 2002 22:19:42 GMT Original-Distribution: world Original-Xref: nntp.stanford.edu gnu.emacs.help:105051 comp.emacs.xemacs:68012 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1605 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1605 In article , Igor6776 wrote: >When I delete words and regions in my xemacs 21.4, it puts theninto the >kill ring. Most users consider this a good thing. It makes it easy to get things back that you delete, although I suppose the advent of unlimited undo's has made this less important than it was in the old days. >I would like to NOT do that and only add stuff to the kill ring that I >select with >\C-w or M-w. > > >how can I do it. I don't think there's a built-in option for this. You could advise all the commands that you don't want to save, with something like (defconst disable-kill-ring-advice (ad-make-advice 'disable-kill-ring nil t '(advice lambda () (let ((kill-ring nil)) ad-do-it)))) (defun disable-kill-ring (function) (ad-add-advice function disable-kill-ring-advice 'around 'first)) (mapc 'disable-kill-ring '(kill-word backward-kill-word kill-line ...)) -- Barry Margolin, barmar@genuity.net Genuity, Woburn, MA *** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups. Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.