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

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

Re: ask for the value of several variables at once


From: tomas
Subject: Re: ask for the value of several variables at once
Date: Fri, 9 Mar 2018 11:21:33 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Mar 09, 2018 at 11:09:11AM +0100, Emanuel Berg wrote:
> tomas wrote:
> 
> >>     (defmacro echo-var (var)
> >>       `(list ,(symbol-name var) ,var) )
> >>     ;; (echo-var fill-column) ; ("fill-column" 47)
> >
> > That's a good first step. The question now is
> > whether to delegate the looping over the list
> > to a function or not.
> 
> I don't get it to work with the set functions
> and &rest. But I almost didn't write a single
> macro all my Elisp life! Some guys do it all
> the time and I suspect for them this task is
> all but trivial...

Ah, macro and varargs. You might take the "cheap" cop-out
and decree that your macro takes *one list* as argument
instead of a variable number of arguments. You'd be in good
company there (cf. the `let' special form). If you're a
perfectionist, more work might be involved (I've no ready
solution for you at the moment, sorry)

Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlqiYC0ACgkQBcgs9XrR2kZ86QCdG6T9YXwRpn0BK4vZijVsuulj
DXYAn2vJI4oOhSAGDu4PwsSPcBz7+KMt
=z2hG
-----END PGP SIGNATURE-----



reply via email to

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