From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: Macro Expansion Inconsistency Date: Tue, 16 Dec 2014 19:03:08 -0800 (PST) Message-ID: <107c0d7b-85e5-480a-a0a4-ebe4662cfad7@googlegroups.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1418785530 8439 80.91.229.3 (17 Dec 2014 03:05:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 17 Dec 2014 03:05:30 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 17 04:05:23 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 1Y14vS-000379-Dd for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Dec 2014 04:05:22 +0100 Original-Received: from localhost ([::1]:47675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y14vR-0000qH-TN for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2014 22:05:21 -0500 X-Received: by 10.67.22.35 with SMTP id hp3mr35081544pad.11.1418785389097; Tue, 16 Dec 2014 19:03:09 -0800 (PST) X-Received: by 10.50.119.129 with SMTP id ku1mr127469igb.4.1418785388894; Tue, 16 Dec 2014 19:03:08 -0800 (PST) Original-Path: usenet.stanford.edu!h15no23572730igd.0!news-out.google.com!d20ni18251igz.0!nntp.google.com!h15no12207183igd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.95.7.75; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 59.95.7.75 User-Agent: G2/1.0 Injection-Date: Wed, 17 Dec 2014 03:03:08 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:209343 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:101622 Archived-At: On Wednesday, December 17, 2014 7:49:21 AM UTC+5:30, Alexander Shukaev wrote: > How to overcome it? Do you have any further recommendations on this macro? > > P.S. It's my first somewhat serious macro in Emacs Lisp ever, so I'd love > to learn more from pros until I do something dumb. Macros are super powerful ... and super hard. My recommendations? 1. [Just an imperative version of Joost suggestons]: use macroexpand to debug them ie see (info "(elisp)expansion") ie if form is a macro-call you can debug it with first using (macroexpand form) and if that looks sane then (eval (macroexpand form)) However... 2. Lisp IS Eval... its evaling all the time so you rarely need to write 'eval' Macros are double eval-layer So you doubly dont need eval