all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / 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

* 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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.