[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: |
Tue, 27 Oct 2015 19:29:57 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
Barry Margolin <barmar@alum.mit.edu> writes:
> 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.
You mean like -
╭────
│(defun qdot/clear-kill-ring (interactive)
╰────
I'm not sure what you mean or how to show it. Is that what you meant?
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
signature.asc
Description: PGP signature
- clear-kill-ring function, Sharon Kimble, 2015/10/27
- Re: clear-kill-ring function, Barry Margolin, 2015/10/27
- Re: clear-kill-ring function,
Sharon Kimble <=
- 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