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: 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

Attachment: signature.asc
Description: PGP signature


reply via email to

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