[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to avoid filling KILL RING with junk
From: |
Barry Margolin |
Subject: |
Re: how to avoid filling KILL RING with junk |
Date: |
Wed, 18 Sep 2002 22:19:42 GMT |
In article <slrnaohrn5.les.ignoramus6776@nospam.invalid>,
Igor6776 <ignoramus6776@NOSPAM.6776.invalid> 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.
- Re: how to avoid filling KILL RING with junk,
Barry Margolin <=