From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: ask for the value of several variables at once Date: Sat, 17 Mar 2018 13:59:40 -0700 Message-ID: References: <87sh9a36pw.fsf@mat.ucm.es> <20180308160838.GA32404@tuxteam.de> <87fu5aqwml.fsf@mat.ucm.es> <20180308215517.GA12322@tuxteam.de> <86o9jxdosm.fsf@zoho.com> <871sgn57ot.fsf@mat.ucm.es> <86tvtjrlrc.fsf@zoho.com> <86muz6ps79.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1521320321 17754 195.159.176.226 (17 Mar 2018 20:58:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Mar 2018 20:58:41 +0000 (UTC) To: Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 17 21:58:37 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1exIuN-0004Qo-IV for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Mar 2018 21:58:31 +0100 Original-Received: from localhost ([::1]:34838 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exIwQ-0006e7-LS for geh-help-gnu-emacs@m.gmane.org; Sat, 17 Mar 2018 17:00:38 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1exIvx-0006bl-KM for help-gnu-emacs@gnu.org; Sat, 17 Mar 2018 17:00:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1exIvr-0007m6-UU for help-gnu-emacs@gnu.org; Sat, 17 Mar 2018 17:00:09 -0400 Original-Received: from mail-wr0-x231.google.com ([2a00:1450:400c:c0c::231]:45913) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1exIvr-0007fv-Nl for help-gnu-emacs@gnu.org; Sat, 17 Mar 2018 17:00:03 -0400 Original-Received: by mail-wr0-x231.google.com with SMTP id h2so14818916wre.12 for ; Sat, 17 Mar 2018 14:00:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=oxeH9bryPVQE2TAPAjCfZgpvkcBmU1FynhKci9DD/+k=; b=YAXNAwvKGCnKKuSos0Hsn9dOAJPBfTzkI6L2oxpHPGFpGmqz06ZEI+nXBxh/La6bAN Vf7Q6o0I3acM3UiX8QPiCnVvMAG0voyY79TSOXdMO7Q938tBsr89gOCuB5u/SUiiEosC Oa5Sl41fzsYmyEnmoj/Nw0ZzqGmRZJIa6TXxbCGVln/WrcImoYRggglU2pu2dqzxmAvE Q5257A9L649SsdXHgA3WAG7aNMxEVTDQev+A0KIgHTsPxfZqGgXGQjm7h8Q13LhrOtou b4/pV4Ot+suR6AgBqRc0In1uVrEMOLry1m2O7LgqUGSDxuu7Z77Nwul50SBIEsqOnKbh /rBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=oxeH9bryPVQE2TAPAjCfZgpvkcBmU1FynhKci9DD/+k=; b=Re4HAaEj8r/ThawqzIGyrEmkREswhGOqFSBP4O+QZf2E8EKvwd/AXWI7SWlx1POQMK iEt+6d0lmIw7U9JaeFb31uQdjNePTlzbv8o0pcPfKzlDe/SAKUgAMUcgWOX3Aql0H9JL +eG3EAUqLANJr/cMBOBF9MBhWKH/UfR22EkJ23Cr9n+Tr8QmoiLhwJsC4Y1ky1AfJyel 1Cwz7Do0qxMOUgLYb5Fjgh6SIgmAuCPnNrrEY1oLwx6kHrCHdODmFNC5vV0N0b1RQB7+ ejALvu5A5rOUn679qQbfH/VwbK9RIZ3pPjNVrsdgOgOrR320bcOUU7nKtQSCQIyM4ZLo XDmQ== X-Gm-Message-State: AElRT7HiPQlSEU/TGeop1Dz99gGQZXJQKAXIvE9wQ9OO/8sgDnWdsBOj zo/kER3+/IPy/MFjLQ32c9TsH+WqbCMXs+Ta0tE5s5/e X-Google-Smtp-Source: AG47ELuEy99yf57x6stGvno0Le7nW/dkiiokDuJxXwe241TKrvAHUlGi9rfEA6ucfm2uGwZdR9AW/m9xugOzBULVdDQ= X-Received: by 10.223.130.246 with SMTP id 109mr3080757wrc.45.1521320401242; Sat, 17 Mar 2018 14:00:01 -0700 (PDT) Original-Received: by 10.28.3.10 with HTTP; Sat, 17 Mar 2018 13:59:40 -0700 (PDT) In-Reply-To: <86muz6ps79.fsf@zoho.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::231 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:116197 Archived-At: Emanuel Berg wrote: > 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) I think what you really want for vars-status is: (defmacro vars-status (&rest sym-list) `(apply #'syms-status ',sym-list)) Or, equivalently (if the quasiquote syntax makes it harder to see what's going on): (defmacro vars-status (&rest sym-list) (list 'apply '(function syms-status) (list 'quote sym-list))) The difference is that your implementation above will call syms-status at macro-expansion time, whereas this will call it at run-time. John