[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AW: define-syntax
From: |
Clinton Ebadi |
Subject: |
Re: AW: define-syntax |
Date: |
Tue, 09 Dec 2008 17:28:44 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
"Pach Roman (DGS-EC/ESG3)" <address@hidden> writes:
>>> test 2:
>>> -------
>>> (define-macro (my-macro-2 par1 par2 par3)
>>> (string-concatenate (list par1 par2 par3)))
A macro defined with define-macro is merely a function that is run at
macroexpansion time and is expected to return a new form for the
compiler. The body of the macro can perform arbitrary computation, and
your macro is actually calling string-concatenate at macroexpansion time
rather than returning the form as you expected.
(define-macro (my-macro-2 par1 par2 par3)
`(string-concatenate (list ,par1 ,par2, par3)))
Will do what you expect.
--
How can you accept social supression
This weak state of mind in our time
I demand release from hypocrisy
I'd rather die than be held down, forced down