Go to the first, previous, next, last section, table of contents.


Changing the quote characters

The default quote delimiters can be changed with the builtin changequote:

changequote(opt start, opt end)

where start is the new start-quote delimiter and end is the new end-quote delimiter. If any of the arguments are missing, the default quotes (` and ') are used instead of the void arguments.

The expansion of changequote is void.

changequote([, ])
=>
define([foo], [Macro [foo].])
=>
foo
=>Macro foo.

If no single character is appropriate, start and end can be of any length.

changequote([[, ]])
=>
define([[foo]], [[Macro [[[foo]]].]])
=>
foo
=>Macro [foo].

Changing the quotes to the empty strings will effectively disable the quoting mechanism, leaving no way to quote text.

define(`foo', `Macro `FOO'.')
=>
changequote(, )
=>
foo
=>Macro `FOO'.
`foo'
=>`Macro `FOO'.'

There is no way in m4 to quote a string containing an unmatched left quote, except using changequote to change the current quotes.

Neither quote string should start with a letter or `_' (underscore), as they will be confused with names in the input. Doing so disables the quoting mechanism.


Go to the first, previous, next, last section, table of contents.