[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 12:49:38 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Fri, Mar 09, 2018 at 11:42:47AM +0100, Emanuel Berg wrote:
> tomas wrote:
>
> > In "classical" Lisps the functions always
> > evaluate their args. The "other" way is what
> > macros are for (or special forms).
>
> Here is a "classical" solution. How to rewrite
> it the "other" way, only Jehovah knows...
>
> (defun echo-vars (&rest vars)
> (mapcar
> (lambda (v) (list (symbol-name v) (symbol-value v)))
> vars))
> ;; (echo-vars 'fill-column 'buffer-file-name)
But then, in the "classical" setting, you'd have to pass the
names as symbols (otherwise they are evaluated), as in
(echo-vars 'foo 'bar 'meep 'boop)
To be honest, then I'd prefer echo-vars took a list instead.
Being pathologically lazy, I might prefer to write
(echo-vars '(foo bar meep boop))
which is one keystroke less ;-D
(don't take me too seriously, though).
Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlqidNIACgkQBcgs9XrR2kb51ACfUY+Emm+LV/sO0gUVDjS66atZ
CI0AnAiHdECY3WztKNbU+wkQxRmOoRu3
=guQY
-----END PGP SIGNATURE-----
- Re: ask for the value of several variables at once, (continued)
- Re: ask for the value of several variables at once, Stefan Monnier, 2018/03/18
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/18
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/14
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, tomas, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once,
tomas <=
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Uwe Brauer, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, tomas, 2018/03/09
- Message not available
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, tomas, 2018/03/09
- Re: ask for the value of several variables at once, Robert L., 2018/03/09
- Re: ask for the value of several variables at once, Emanuel Berg, 2018/03/09
- Re: ask for the value of several variables at once, Yuri Khan, 2018/03/09
- Re: ask for the value of several variables at once, Uwe Brauer, 2018/03/09