From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: augukarl@yahoo.se Newsgroups: gmane.emacs.help Subject: Re: `call-interactively' only the first time Date: 17 Aug 2006 06:19:31 -0700 Organization: http://groups.google.com Message-ID: <1155820770.967587.29970@i42g2000cwa.googlegroups.com> References: <1155649715.990116.250240@m79g2000cwm.googlegroups.com> <1155694417.964904.152030@i3g2000cwc.googlegroups.com> <1155722311.471292.113200@i42g2000cwa.googlegroups.com> <1155741608.389713.3210@74g2000cwt.googlegroups.com> <1155805523.835502.309550@i42g2000cwa.googlegroups.com> <1155816126.051555.197190@b28g2000cwb.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1155822046 25885 80.91.229.2 (17 Aug 2006 13:40:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 17 Aug 2006 13:40:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 17 15:40:44 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GDi6o-0004HY-Hd for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Aug 2006 15:40:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GDi6n-0003Sc-OC for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Aug 2006 09:40:29 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!i42g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 36 Original-NNTP-Posting-Host: 193.111.107.249 Original-X-Trace: posting.google.com 1155820776 2372 127.0.0.1 (17 Aug 2006 13:19:36 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 17 Aug 2006 13:19:36 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5,gzip(gfe),gzip(gfe) X-HTTP-Via: 1.1 sharon.nordnet.se:3128 (squid/2.5.STABLE6) Complaints-To: groups-abuse@google.com Injection-Info: i42g2000cwa.googlegroups.com; posting-host=193.111.107.249; posting-account=lFYKQQ0AAABTiPyPF35sjusGiOMrOa1o Original-Xref: shelby.stanford.edu gnu.emacs.help:141101 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:36726 Archived-At: 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