* interactive function name
@ 2011-03-20 22:38 Ritchie
2011-03-20 22:45 ` Antoine Levitt
[not found] ` <mailman.7.1300661148.12439.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 3+ messages in thread
From: Ritchie @ 2011-03-20 22:38 UTC (permalink / raw)
To: help-gnu-emacs
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?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: interactive function name
2011-03-20 22:38 interactive function name Ritchie
@ 2011-03-20 22:45 ` Antoine Levitt
[not found] ` <mailman.7.1300661148.12439.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 3+ messages in thread
From: Antoine Levitt @ 2011-03-20 22:45 UTC (permalink / raw)
To: help-gnu-emacs
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".
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: interactive function name
[not found] ` <mailman.7.1300661148.12439.help-gnu-emacs@gnu.org>
@ 2011-03-20 22:54 ` Pascal J. Bourguignon
0 siblings, 0 replies; 3+ messages in thread
From: Pascal J. Bourguignon @ 2011-03-20 22:54 UTC (permalink / raw)
To: help-gnu-emacs
Antoine Levitt <antoine.levitt@gmail.com> writes:
> 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".
or funcall.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-20 22:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-20 22:38 interactive function name Ritchie
2011-03-20 22:45 ` Antoine Levitt
[not found] ` <mailman.7.1300661148.12439.help-gnu-emacs@gnu.org>
2011-03-20 22:54 ` Pascal J. Bourguignon
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).