m4/examples/quote.m4
Eric Blake 37c536d08c * examples/forloop.m4: Simplify.
* examples/forloop2.m4: New file.
* examples/quote.m4: New file.
* doc/m4.texinfo (Loops): Rename to...
(Shift): ...this node.
(Forloop, Foreach, Improved forloop, Improved foreach): New
nodes.
2007-09-21 15:27:40 -06:00

10 lines
402 B
Plaintext

divert(`-1')
# quote(args) - convert args to single-quoted string
define(`quote', `ifelse(`$#', `0', `', ``$*'')')
# dquote(args) - convert args to quoted list of quoted strings
define(`dquote', ``$@'')
# dquote_elt(args) - convert args to list of double-quoted strings
define(`dquote_elt', `ifelse(`$#', `0', `', `$#', `1', ```$1''',
```$1'',$0(shift($@))')')
divert`'dnl