unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Argument-list in function with variable number of arguments...
@ 2005-05-20 14:17 luca.spinacci
  2005-05-20 15:15 ` Kevin Rodgers
  0 siblings, 1 reply; 3+ messages in thread
From: luca.spinacci @ 2005-05-20 14:17 UTC (permalink / raw)



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 <Ret>
First : first_argument <Ret>
Second : second_argument <Ret>
Third : third_argument <Ret>
...and so on without knowing their number in advance.

Is it possible?
Thank you very much,
Luca.

^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <mailman.1029.1116599428.25862.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2005-05-20 15:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-20 14:17 Argument-list in function with variable number of arguments luca.spinacci
2005-05-20 15:15 ` Kevin Rodgers
     [not found] <mailman.1029.1116599428.25862.help-gnu-emacs@gnu.org>
2005-05-20 15:00 ` Pascal 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).