From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: Macro Expansion Inconsistency Date: Tue, 16 Dec 2014 15:20:31 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1418772075 15206 80.91.229.3 (16 Dec 2014 23:21:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2014 23:21:15 +0000 (UTC) Cc: Alexander Shukaev To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 00:21:08 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y11QR-00089b-Py for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 00:21:07 +0100 Original-Received: from localhost ([::1]:47200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y11QR-0003U9-Bk for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2014 18:21:07 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59441) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y11QD-0003U4-7o for help-gnu-emacs@gnu.org; Tue, 16 Dec 2014 18:20:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y11QC-0002mG-74 for help-gnu-emacs@gnu.org; Tue, 16 Dec 2014 18:20:53 -0500 Original-Received: from mail-ob0-x229.google.com ([2607:f8b0:4003:c01::229]:39442) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y11QC-0002ly-2k for help-gnu-emacs@gnu.org; Tue, 16 Dec 2014 18:20:52 -0500 Original-Received: by mail-ob0-f169.google.com with SMTP id vb8so1155733obc.0 for ; Tue, 16 Dec 2014 15:20:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ksu7nB1dzfjkSPGToMfEg/RYlyRwWlCa/FutpxZSy9M=; b=m5BExnw+umpCmf83A5sb1UPrk70maDTVFSslCD0kOnaXJ22ktnyKOi6zdeD/zUlKB4 hDcSA9LooFtucjfhaOfO8u3xqM1sNCMAndsa00v5KXtNj8YtiD22EVqVTm1f4YfIdn2g HGWfZLMKzT9tliNFB6ZCwT93pVFGgfzt1CX+Zcd+ZemBD9TwrINpkwyncwQy1F3kKBEi Mqdmz2AuSDkK1RUAbZK2kOTpom0RlhFrO6FDwB4fUXPaiqPuhOCqIMK/SWbK2kRtw46c 90Ikx+Te0Z37vn8l3kcF44EXCuhwnq32lVvVh+SlHFjjMQRElrNX2teUcJk0+ewZcwCD +Uew== X-Received: by 10.60.46.196 with SMTP id x4mr24076627oem.78.1418772051375; Tue, 16 Dec 2014 15:20:51 -0800 (PST) Original-Received: by 10.76.12.162 with HTTP; Tue, 16 Dec 2014 15:20:31 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c01::229 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:101613 Archived-At: Alexander Shukaev wrote: > Yes, I get it, but then how do I do something like > > (defmacro test > (name) > `(let* ((name ',name)) > (defvar ,(intern (concat "some" "-" (symbol-name name)))))) > > but using variable `symbol'? Does this work? If not, can you clarify why the `symbol' variable needs to be around at evaluation time? (defmacro test (name) (let ((symbol (intern (concat "some" "-" (symbol-name name))))) `(defvar ,symbol))) -- john