[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Macro Expansion Inconsistency
From: |
Rusi |
Subject: |
Re: Macro Expansion Inconsistency |
Date: |
Tue, 16 Dec 2014 19:03:08 -0800 (PST) |
User-agent: |
G2/1.0 |
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
- Re: Macro Expansion Inconsistency, (continued)
- Re: Macro Expansion Inconsistency, Nicolas Richard, 2014/12/17
- Re: Macro Expansion Inconsistency, Alexander Shukaev, 2014/12/17
- Re: Macro Expansion Inconsistency, Nicolas Richard, 2014/12/17
- Re: Macro Expansion Inconsistency, Alexander Shukaev, 2014/12/17
- Message not available
- Re: Macro Expansion Inconsistency, Barry Margolin, 2014/12/17
- Re: Macro Expansion Inconsistency, Alexander Shukaev, 2014/12/17
- Message not available
- Re: Macro Expansion Inconsistency,
Rusi <=
- Re: Macro Expansion Inconsistency, Nicolas Richard, 2014/12/17
- Re: Macro Expansion Inconsistency, John Mastro, 2014/12/16
- Message not available
- Re: Macro Expansion Inconsistency, John Mastro, 2014/12/16
- Re: Macro Expansion Inconsistency, John Mastro, 2014/12/16
Re: Macro Expansion Inconsistency, Stefan Monnier, 2014/12/16