[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: clear-kill-ring function
From: |
Barry Margolin |
Subject: |
Re: clear-kill-ring function |
Date: |
Tue, 27 Oct 2015 14:49:53 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.1159.1445970298.7904.help-gnu-emacs@gnu.org>,
Sharon Kimble <boudiccas@skimble.plus.com> wrote:
> --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
>
> ¢~¢w¢w¢w¢w
> ¢x(wrong-type-argument commandp qdot/clear-kill-ring) in
> ad-Advice-call-interactively
> ¢¢¢w¢w¢w¢w
>
> So what should I have in my function please to get it working properly?
You forgot to put (interactive) in qdot/clear-kill-ring, to indicate
that it's a command, not just an ordinary function.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
- clear-kill-ring function, Sharon Kimble, 2015/10/27
- Re: clear-kill-ring function,
Barry Margolin <=
- Re: clear-kill-ring function, Sharon Kimble, 2015/10/27
- Re: clear-kill-ring function, Michael Heerdegen, 2015/10/27
- Re: clear-kill-ring function, Sharon Kimble, 2015/10/28
- Message not available
- Re: clear-kill-ring function, Joost Kremers, 2015/10/28
- Re: clear-kill-ring function, Michael Heerdegen, 2015/10/28
- Re: clear-kill-ring function, Emanuel Berg, 2015/10/28
- Re: clear-kill-ring function, Emanuel Berg, 2015/10/27