Re: Newbie - having difficulty with a macro

John Christopher <[email protected]>
Newsgroups gmane.comp.gnu.m4.general
Message-ID <[email protected]>
--- On Sat, 11/1/08, Eric Blake <[email protected]> wrote:

> [Please don't top-post]

I'm sorry.


> The other way is to recognize that you are using MACRO1 as
> a means of holding a text value, rather than a macro that
> you want expanded.  In other words, you want the definition
> of MACRO1 as the argument to m4_format, and not its expansion.

Yes, exactly.  Sorry I was not more clear.


> m4_format(m4_defn(`MACRO1'), `3', `2')
> 
> does what you want, because the intermediate expansion is:
> 
> m4_format(`%d foo, bar %d', `3', `2')

Yes, this solves my problem.  I get it now.
Thanks for your help.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.