[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `call-interactively' only the first time
From: |
wenbinye |
Subject: |
Re: `call-interactively' only the first time |
Date: |
17 Aug 2006 05:02:06 -0700 |
User-agent: |
G2/0.2 |
You didn't provide the real code, 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.
Another question is how do you restore the argument when called
interactively first time?
(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)
augukarl@yahoo.se wrote:
> wenbinye@gmail.com skrev:
> > Can you give the definition of the function?
>
> Here is the pseudo code for the function I want to define:
>
> (defun f (g) ;; g is an interactive function.
> ;; Call g interactively.
> ;; Call g non-interactively with the parameters (specified by
> ;; the user) in the command above.
> )
>
> Is this clear enough?
>
>
> Thanks,
>
> August