unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
Subject: RE: newbie elisp question
Date: Wed, 7 Sep 2005 19:20:21 -0700	[thread overview]
Message-ID: <DNEMKBNJBGPAOPIJOOICCEGCCMAA.drew.adams@oracle.com> (raw)
In-Reply-To: <iWMTe.9109$FW1.3505@newsread3.news.atl.earthlink.net>

    With the following forms in my .emacs, which the *scratch* buffer
    evaluates without complaint, (from which I infer that they are at least
    syntactically correct)
    
    (defconst *vowels* '(?a ?e ?i ?o ?u ?y)
      "A list of the English vowels in lowercase.")
    
    ...
    (defun vowelp (char)
      (memq (downcase char) *vowels*))
    
    (defun goto-vowel
    "Skip to next vowel after point."
    (interactive)
    (while (not (vowelp (char-after))) (forward-char))
    )
    
    (define-key global-map [f11] 'goto-vowel)
    
    ...
    
    I get this error message:
    
    "call-interactively: Invalid function: (lambda "Skip to next vowel after
    point." (interactive) (while (not (vowelp (char-after)))
    (forward-char)))"
    
    What am I not understanding here?

Your function is missing an argument list. It should have the empty list after the command name:

    (defun goto-vowel ()
     ...)

  reply	other threads:[~2005-09-08  2:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08  1:59 newbie elisp question B. T. Raven
2005-09-08  2:20 ` Drew Adams [this message]
2005-09-08  4:19 ` Pascal Bourguignon
2005-09-08 22:40   ` B. T. Raven
2005-09-09  0:08     ` Pascal Bourguignon
2005-09-09 16:28       ` B. T. Raven
2005-09-09 17:32         ` Pascal Bourguignon

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=DNEMKBNJBGPAOPIJOOICCEGCCMAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    /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).