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

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

Re: interactive function name


From: Antoine Levitt
Subject: Re: interactive function name
Date: Sun, 20 Mar 2011 23:45:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

20/03/11 23:38, Ritchie
> I'm trying to use the interactive function name feature. On emacs lisp
> manual it says:
>
> ‘a’
> A function name (i.e., a symbol satisfying fboundp). Existing,
> Completion, Prompt.
>
> So I tried it with a small test code:
>
> (defun testfun1 ()
>   (message "hello, world!"))
>
> (defun test (abcd)
>   (interactive "aTheme name: ")
>   (abcd))
>
> Emacs gives an error saying,
>
> test: Symbol's function definition is void: abcd
>
> I tried to test abcd with fboundp, it returns t. So I'm quite confused
> about how to use the 'a' option in interactive.
> Any body can give some hints?

Your problem is not with interactive. (abcd) evaluates the function
"abcd", while you want the function contained in the variable
"abcd". Try "apply".




reply via email to

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