[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `call-interactively' only the first time
From: |
augukarl |
Subject: |
Re: `call-interactively' only the first time |
Date: |
17 Aug 2006 06:19:31 -0700 |
User-agent: |
G2/0.2 |
wenbinye@gmail.com skrev:
> You didn't provide the real code,
Of course not. My question is how to write it.
> I assume you may make mistake when use
> the function in parameter, which is named g in you pseudo code. You
> should use funcall function.
How can it be a misstake? I haven't written any (real) function-call
statements.
> Another question is how do you restore the argument when called
> interactively first time?
Exactly, that's the essence of my question.
> (defun foo (arg)
> (interactive "sGive me a string: ")
> (message "foo: %S" arg))
>
> (defun bar (func)
> (message "first call: ")
> (call-interactively func)
> (message "call again: ")
> (funcall func "efg"))
>
> ;; use like this:
> (bar 'foo)
This is only a special case. In my pseudo code I put no restrictions on
the command g (it can take any number of parameters).
August