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: Sharon Kimble
Subject: Re: clear-kill-ring function
Date: Wed, 28 Oct 2015 06:06:10 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> You mean like -
>>
>> ╭────
>> │(defun qdot/clear-kill-ring (interactive)
>> ╰────
>
> More like
>
>   (defun qdot/clear-kill-ring ()
>     (interactive)
>     ...)
>
> See (info "(elisp) Using Interactive").

Thanks for this Michael, I now have -

--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(defun clear-kill-ring ()
(interactive)
  "Clear the kill ring variable"
  (setq kill-ring nil))
(global-set-key (kbd "s-/") 'clear-kill-ring)
#+end_src
--8<---------------cut here---------------end--------------->8---

And have restarted emacs several times, but if I do a "s-." before hand
I can see several items on the kill-ring. So I then do "s-/" to clear
the kill-ring, and if I then do a further "s-." it shows that there
still remains the same items on the kill-ring, i.e. nothing has changed!
Or, IOW, the function isn't working!

So I'm back to my original question, what do I have to do to get it
working please?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.1

Attachment: signature.asc
Description: PGP signature


reply via email to

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