* bin/autom4te.in (&handle_output): s/@__@/@&t@/.

Suggested by Paul Eggert.
This commit is contained in:
Akim Demaille 2001-08-29 13:11:16 +00:00
parent bf8c22c9ab
commit 0b057944a7
6 changed files with 30 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2001-08-29 Akim Demaille <akim@epita.fr>
* bin/autom4te.in (&handle_output): s/@__@/@&t@/.
Suggested by Paul Eggert.
2001-08-29 Akim Demaille <akim@epita.fr>
* Makefile.maint (do-po-update): Wget refuses to overwrite files:

View File

@ -716,10 +716,26 @@ sub handle_output ($$)
}
# Performed *last*: the empty quadrigraph. Handling it last
# makes it possible to generate quadrigraphs, e.g. `@<@__@:@'
# makes it possible to generate quadrigraphs, e.g. `@<@&t@:@'
# produces `@<:@'. In addition, it provides a means to
# explicitly allow some *occurrences* of forbidden patterns.
$res =~ s/\@__\@//g;
#
# The use of `@&t@' was suggested by Paul Eggert:
#
# ``I should give some credit to the @&t@ pun. The "&" is my
# own invention, but the "t" came from the source code of the
# ALGOL68C compiler, written by Steve Bourne (of Bourne shell
# fame), and which used "mt" to denote the empty string. In C,
# it would have looked like something like this:
#
# char const mt[] = "";
#
# but of course the source code was written in Algol 68.
#
# I don't know where he got "mt" from: it could have been his
# own invention, and I suppose it could have been a common pun
# around the Cambridge University computer lab at the time.''
$res =~ s/\@&t\@//g;
print $out "$res\n";
}

View File

@ -31,7 +31,7 @@ AT_SETUP([AC_REQUIRE: topological sort])
AT_DATA([configure.ac],
[[define([REQUIRE_AND_CHECK],
[AC_REQUIRE([$1])
test -z "$m4@__@_translit([$1], [A-Z], [a-z])" && AS_EXIT(1)])
test -z "$m4@&t@_translit([$1], [A-Z], [a-z])" && AS_EXIT(1)])
AC_DEFUN([TEST1],
[REQUIRE_AND_CHECK([TEST2a])

View File

@ -34,7 +34,7 @@ AT_DATA([configure.ac],
[[AC_PLAIN_SCRIPT()
#! /bin/sh
_AS@__@_EXPR_PREPARE
_AS@&t@_EXPR_PREPARE
m4_define([DIRNAME_TEST],
[dir=`AS_DIRNAME([$1])`

View File

@ -121,7 +121,7 @@ AT_SETUP([[m4_text_wrap]])
# m4-listification.
AT_DATA([script.s4g],
[[m4@__@_divert_push([0])m4@__@_wrap([m4@__@_divert_pop([0])])d@__@nl
[[m4@&t@_divert_push([0])m4@&t@_wrap([m4@&t@_divert_pop([0])])d@&t@nl
m4_text_wrap([Short string */], [ ], [/* ], 20)
m4_text_wrap([Much longer string */], [ ], [/* ], 20)

View File

@ -264,7 +264,7 @@ BAC_FOO
B_AC_FOO
AS_FOO
_AS_BAR
[d@__@nl]
[d@&t@nl]
]])
AT_CHECK_AUTOCONF([], 1, [],
@ -275,7 +275,7 @@ configure.ac:5: error: possibly undefined macro: _m4_bar
configure.ac:7: error: possibly undefined macro: B_AC_FOO
configure.ac:8: error: possibly undefined macro: AS_FOO
configure.ac:9: error: possibly undefined macro: _AS_BAR
configure.ac:10: error: possibly undefined macro: d@__@nl
configure.ac:10: error: possibly undefined macro: d@&t@nl
]])
AT_CLEANUP
@ -291,11 +291,11 @@ AT_DATA([configure.ac],
# This is allowed in spite of the name.
# It is on purpose that we check the case where there are several
# tokens on the same line.
m4@__@_pattern_allow([^AC_ALLOWED$])
m4@&t@_pattern_allow([^AC_ALLOWED$])
NOT_AC_ALLOWED AC_ALLOWED AC_ALLOWED_NOT
# Test forbidding.
m4@__@_pattern_forbid([^FORBIDDEN$])
m4@&t@_pattern_forbid([^FORBIDDEN$])
NOT_FORBIDDEN FORBIDDEN FORBIDDEN_NOT
# Test Autoconf's patterns.