m4/examples/wraplifo2.m4
Eric Blake 6b1c5a2cbd Document join, in order to fix bug in m4wrap example.
* examples/join.m4: New file.
* examples/wraplifo2.m4: Likewise.
* Makefile.am (EXTRA_DIST): Add new files.
* doc/m4.texinfo (Improved m4wrap): New node.
(Defn, Location): Enhance tests.
(Shift): Document the composit macro join.
(Incompatibilities): Move documentation of LIFO vs. FIFO...
(M4wrap): ...here, to match improved example.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-03-15 20:52:36 -06:00

10 lines
351 B
Plaintext

dnl Redefine m4wrap to have LIFO semantics, improved example.
include(`join.m4')dnl
define(`_m4wrap', defn(`m4wrap'))dnl
define(`_arg1', `$1')dnl
define(`m4wrap',
`ifdef(`_$0_text',
`define(`_$0_text', joinall(` ', $@)defn(`_$0_text'))',
`_$0(`_arg1(defn(`_$0_text')undefine(`_$0_text'))')dnl
define(`_$0_text', joinall(` ', $@))')')dnl