[Top][All Lists]

[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: Sat, 17 Mar 2018 17:44:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Here it is! Only I don't have

;; sc-citation-leader
;; sc-reference-tag-string

so add them manually. I wonder tho if the
"verbose" version should be a macro as well?
That would be better, I think.

But as I've said, I'm not good with macros, and
it shows, because as much as this seems to work
when eval'd and executed, the byte compiler
doesn't like it:

    geh.el:24:1:Error: Symbol's function definition
    is void: syms-status

(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)))
;; (setq  foo 22  bar 88)
;; (vars-status foo bar)

(require 'cl-lib)
(defun all-systems-ready ()
  (let ((report (vars-status message-yank-cited-prefix message-yank-prefix))
        (output ""))
     for (var val) in report do
     (setq output (concat output (format "%s: [%s]  " var val))) )
    (message output) ))
;; (all-systems-ready)

underground experts united

reply via email to

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