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

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

clear-kill-ring function


From: Sharon Kimble
Subject: clear-kill-ring function
Date: Tue, 27 Oct 2015 18:24:43 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

For a long time I have wanted to have some way of clearing the
kill-ring, and I have recently started using the "cliphist" package,
like this -

--8<---------------cut here---------------start------------->8---
#+begin_src emacs-lisp
(require 'cliphist)
(global-set-key (kbd "s-,") 'cliphist-select-item)
(global-set-key (kbd "s-.") 'cliphist-paste-item)
#+end_src
--8<---------------cut here---------------end--------------->8---

which is working very well to use data from "parcellite".

And I seem to have found a way of clearing the kill-ring, at 
http://qdot.github.io/conf_emacs/

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

However when I do "s-/" emacs replied with

╭────
│(wrong-type-argument commandp qdot/clear-kill-ring) in 
ad-Advice-call-interactively
╰────

So what should I have in my function please to get it working properly?

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]