help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: newbie elisp question


From: Drew Adams
Subject: RE: newbie elisp question
Date: Wed, 7 Sep 2005 19:20:21 -0700

    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 via email to

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