From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: clear-kill-ring function
Date: Tue, 27 Oct 2015 14:49:53 -0400 [thread overview]
Message-ID: <barmar-A9BE70.14495327102015@88-209-239-213.giganet.hu> (raw)
In-Reply-To: mailman.1159.1445970298.7904.help-gnu-emacs@gnu.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 938 bytes --]
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 ***
next parent reply other threads:[~2015-10-27 18:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1159.1445970298.7904.help-gnu-emacs@gnu.org>
2015-10-27 18:49 ` Barry Margolin [this message]
2015-10-27 19:29 ` clear-kill-ring function Sharon Kimble
2015-10-27 20:18 ` Michael Heerdegen
2015-10-28 6:06 ` Sharon Kimble
[not found] ` <mailman.1186.1446012388.7904.help-gnu-emacs@gnu.org>
2015-10-28 10:37 ` Joost Kremers
2015-10-28 12:46 ` Michael Heerdegen
2015-10-29 2:34 ` Emanuel Berg
2015-10-28 2:14 ` Emanuel Berg
2015-10-27 18:24 Sharon Kimble
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=barmar-A9BE70.14495327102015@88-209-239-213.giganet.hu \
--to=barmar@alum.mit.edu \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).