From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: luca.spinacci@seleniacomms.com Newsgroups: gmane.emacs.help Subject: Argument-list in function with variable number of arguments... Date: Fri, 20 May 2005 16:17:36 +0200 Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1116599884 14306 80.91.229.2 (20 May 2005 14:38:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 20 May 2005 14:38:04 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 20 16:37:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DZ8bU-00021G-Sl for geh-help-gnu-emacs@m.gmane.org; Fri, 20 May 2005 16:35:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DZ8eM-0002i9-3o for geh-help-gnu-emacs@m.gmane.org; Fri, 20 May 2005 10:38:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DZ8W8-0002l2-7T for help-gnu-emacs@gnu.org; Fri, 20 May 2005 10:30:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DZ8W6-0002kJ-Ty for help-gnu-emacs@gnu.org; Fri, 20 May 2005 10:30:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DZ8VQ-0002Jt-3u for help-gnu-emacs@gnu.org; Fri, 20 May 2005 10:29:40 -0400 Original-Received: from [81.120.201.7] (helo=relay1.seleniacomms.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DZ8SO-0007k4-KO for help-gnu-emacs@gnu.org; Fri, 20 May 2005 10:26:33 -0400 Original-Received: from gefss001 ([10.1.202.2]) by relay1.seleniacomms.com (8.12.11/8.12.11) with ESMTP id j4KEGYdo013356 for ; Fri, 20 May 2005 16:16:35 +0200 (CEST) Sensitivity: Original-To: help-gnu-emacs@gnu.org X-MIMETrack: Serialize by Router on mgeg01/S/EXT/MM1(Release 6.5.3|September 14, 2004) at 05/20/2005 16:17:40 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:26855 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:26855 Is there a way to have a variable number of arguments in a function argument-list? I know how to write a function in which a fixed number of arguments is expected for ex. ( defun my-function ( first second ) (interactive "sFirst : \nsSecond : ") (insert ""first"\n" ""second"\n") ) So I'm asked for "first" and for "second"...and my-function inserts the two of them in a buffer. I would like to have more arguments (let's say n) and being asked for them interactively, for instance: How many arguments? : 5 First : first_argument Second : second_argument Third : third_argument ...and so on without knowing their number in advance. Is it possible? Thank you very much, Luca.