Next: , Previous: , Up: Autoconf Language   [Contents][Index] Quadrigraphs

When writing an Autoconf macro you may occasionally need to generate special characters that are difficult to express with the standard Autoconf quoting rules. For example, you may need to output the regular expression ‘[^[]’, which matches any character other than ‘[’. This expression contains unbalanced brackets so it cannot be put easily into an M4 macro.

You can work around these problems by using one of the following quadrigraphs:














Expands to nothing.

Quadrigraphs are replaced at a late stage of the translation process, after m4 is run, so they do not get in the way of M4 quoting. For example, the string ‘^@<:@’, independently of its quotation, appears as ‘^[’ in the output.

The empty quadrigraph can be used:

The ‘@&t@’ sequence is a pun — “and tee” sounds a bit like “empty.”

Additionally, there are a few m4sugar macros (such as m4_split and m4_expand) which internally use special markers in addition to the regular quoting characters. If the arguments to these macros contain the literal strings ‘-=<{(’ or ‘)}>=-’, the macros might behave incorrectly. (See Programming in M4sugar.)

Next: , Previous: , Up: Autoconf Language   [Contents][Index]