help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing a list to an interactive function


From: tomas
Subject: Re: Passing a list to an interactive function
Date: Fri, 18 Dec 2020 12:50:41 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Fri, Dec 18, 2020 at 12:38:17PM +0100, pietru@caramail.com wrote:
> 
> 
> > Sent: Friday, December 18, 2020 at 12:30 PM
> > From: "Jean Louis" <bugs@gnu.support>
> > To: pietru@caramail.com
> > Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
> > Subject: Re: Passing a list to an interactive function
> >
> > * pietru@caramail.com <pietru@caramail.com> [2020-12-18 14:19]:
> > > I would like to pass a list to an interactive function.  How can I do 
> > > that?
> >
> > (funcall-interactively #'YOUR-FUNCTION '("List" 2))
> 
> I mean, how do I define an interactive function that takes a list as argument?

I'd guess that 'x' is the most appropriate template char. Extracted from
`interactive's docstring:

  x -- Lisp expression read but not evaluated.

Or you don't provide a string description to `interactive'. Then you
have full control over the user input (for example, if you have a
more concrete idea about how your list's members should look like:
you didn't say anything about that part :-)

Cheers
 - t

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]