[M-F-T: [EMAIL PROTECTED]]
>>> "Martin" == Martin Frydl <[EMAIL PROTECTED]> writes:
[...]
Martin> I've created a patch which is aware of M4 problem and
Martin> separates the task into two expressions - first removes the
Martin> terminating space, then strips the leading one and puts brackets
Martin> around.
[...]
Martin> + [at_patsubst(at_patsubst(at_patsubst(at_patsubst([[[[$1]]]], [\\\n]),
Martin> + [[\n\t ]+], [ ]),
Martin> + [ *\(.\)$],[\1]),
Martin> + [^ *\(.*\)], [[\1]])])
This doesn't seem to do what you want. `[ *\(.\)$],[\1]' will leave the
last trailing space, or strip non trailing whitespaces.
How about something like
[at_patsubst(at_patsubst(at_patsubst(at_patsubst([[[[$1]]]], [\\\n]),
[[\n\t ]+], [ ]),
[ *$]),
[^ *\(.*\)], [[\1]])])
--
Alexandre Duret-Lutz