-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paolo Bonzini on 10/30/2008 11:54 AM: >> then any instances of $LINENO in text will be turned into \$LINENO. > > Then you should not do it. :-( But we have to warn. Again, however, > this luckily is not a regression.
I like your idea of catching ourselves in advance, to avoid a rather difficult failure to diagnose (since the failure would only be on systems with deficient LINENO shells). > > and make \$LINENO forbidden, as in the attached patch (proof of concept, > totally untested, includes the above hunk). Have you had a chance to test this patch yet? It looks mostly sane... > # Forbidden tokens and exceptions. > +_m4_pattern_forbid([\\\$LINENO], [something ought to be written here]) > m4_pattern_forbid([^_?AS_]) I'm assuming you'd fix that. > # m4_pattern_allow(ERE) > # --------------------- > # ... that token also matches the allowed extended regular expression ERE. > # Both used via traces. > -m4_define([m4_pattern_allow], []) > +m4_define([m4_pattern_allow], [_$0([\b$1\b], m4_shift($@))]) > +m4_define([_m4_pattern_allow], []) Independent of your patch, but at least the m4sugar side of this ought to mention the use of a second parameter as the warning issued when this is encountered. Also, your use of m4_shift always produces a second argument, even if m4_pattern_allow was only called with one; does the trace-parsing side of autom4te treat an empty argument the same as a missing one? - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----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 iEYEARECAAYFAkkO+rQACgkQ84KuGfSFAYD7QgCgoHoCH6gqjoyizALQ1tLvXdOD GfwAoKyFCG0j1vwNp3KVpxJSgb2A8P5Q =N7QA -----END PGP SIGNATURE-----
