-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paolo Bonzini on 3/3/2009 2:21 AM: >> I currently don't see the need for it. But you can also just add those >> two lines of example to the @comment if you prefer that to nuking. > > I'm thinking of an alternate implementation. Sorry for coming up late > with this. What if instead you leave AS_ESCAPE as it was, and instead > add _AS_ESCAPE1/2/3/4 for Autoconf's private usage? That would be > implemented like this:
Looks like it has merit: > > m4_define([AS_ESCAPE], > [m4_if([$2], [], > [m4_if(m4_len([$1], m4_len(m4_translit([[$1]], [$2])), > [$1], [_AS_ESCAPE($@)])], > [_AS_ESCAPE4([$1], [`], ['], [""], [$])]) Thus, short strings benefit from our filtering for strings that need no escapes, avoiding regex when possible, while long strings are still handled (except you still have an issue with escaping -, [, and ], that has always been present even before I started touching this). I'll play with it, and see what I can come up with. Meanwhile, I've noticed that AC_LITERAL_IF is a bit beefy for what is really necessary. - -- Don't work too hard, make some time for fun as well! Eric Blake e...@byu.net -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEARECAAYFAkmtKzcACgkQ84KuGfSFAYDAZACgwX6JRAFffFvmLW4mUHTePH+f akkAmMM4PES9CdIAhsaIlVsfpHAMWmo= =/5at -----END PGP SIGNATURE-----