Hi,

I have a problem. This is my code:
--- CUT HERE ---
divert(-1)

define(`___DEF', `define(`__$1', `define(`_a$1', `a$1')')')
dumpdef(`___DEF')
___DEF(`T')
dumpdef(`__T')
__T(`abc')
dumpdef(`_aT')

divert(0)dnl

_aT
--- CUT HERE ---

What I meant is to define ___DEF macro, whose argument will
be used in creating another macro (__T in the above example),
which will be a macro creating a simple macro (without args).
I would like the last expression to result in "aabc".
The problem is that the last `$1' is expanded into `T'. I would
rather like to expand it later.
(this is not exactly what I want, but I want sth similar and the
above is a simplified version - just to show the exact problem)

I tried some to modify it, like `$'1, $`1', `$'{1}, ... but none
of them worked :(

What is the correct syntax to achieve my goal?

PS. Please CC me, as I am not subscribing this list.
(I will check the archives nevertheless)

Cheers,
Peter


_______________________________________________
m4-discuss mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/m4-discuss

Reply via email to