help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clear-kill-ring function


From: Michael Heerdegen
Subject: Re: clear-kill-ring function
Date: Wed, 28 Oct 2015 13:46:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Joost Kremers <joost.m.kremers@gmail.com> writes:

> (defun clear-kill-ring ()
>   "Clear the kill ring variable"
>   (interactive)
>   (setq kill-ring nil))
> (global-set-key (kbd "s-/") 'clear-kill-ring)

It's more consistent to also reset the yank pointer:

(defun clear-kill-ring ()
  "Clear the kill ring variable"
  (interactive)
  (setq kill-ring nil
        kill-ring-yank-pointer nil))

> > Or, IOW, the function isn't working!
>
> It probably is.

Indeed, it is.


Michael.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]