diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-09-22 07:04:10 +0000 |
---|---|---|
committer | <> | 2015-02-02 12:02:31 +0000 |
commit | 23c11479b3ad787adc7a651ee0c4347839e47723 (patch) | |
tree | 3aa9e1125da84f7e3bd764bbff577c42a766508b /examples/wraplifo2.m4 | |
download | m4-tarball-master.tar.gz |
Diffstat (limited to 'examples/wraplifo2.m4')
-rw-r--r-- | examples/wraplifo2.m4 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/wraplifo2.m4 b/examples/wraplifo2.m4 new file mode 100644 index 0000000..5b450a7 --- /dev/null +++ b/examples/wraplifo2.m4 @@ -0,0 +1,9 @@ +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 |