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: Emanuel Berg
Subject: Re: ask for the value of several variables at once
Date: Wed, 14 Mar 2018 11:31:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Yuri Khan wrote:

> The main advantage as I see it is that you
> don’t have to repeat each variable’s
> name(once in the format string, again in the
> arguments to ‘message’).

? Who is repeating, you or me?

BTW, what exactly is "my" suggestion? I feel
like I just dumped a bunch of code. Did anyone
put it together to solve this particular issue?
I'm going to the public library right now to
look for trouble, but if no one did it I'll do
it tonight God willing.

Here are the building blocks of the universe.
I guess I like it fine - so far.

(defun syms-status (&rest sym-list)
  (mapcar (lambda (s) (list s (symbol-value s))) sym-list))

(defmacro vars-status (&rest sym-list)
  `(quote ,(apply #'syms-status sym-list)))

;; eval us:
;; (setq  foo 22  bar 88)
;; (vars-status foo bar)

-- 
underground experts united
http://user.it.uu.se/~embe8573


reply via email to

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