I've seen the answer here for Latex. How can I adapt this to plain TeX or OPTeX?
\frlang
\fontfam[Times]
{
\catcode`\:=\active
\catcode`\;=\active
\catcode`\?=\active
\catcode`\!=\active
\catcode`\«=\active
\catcode`\»=\active
\gdef\frenchpunct{%
\catcode`\:=\active \def:{\thinspace\char`\: }
\catcode`\;=\active \def;{\thinspace\char`\; }
\catcode`\?=\active \def?{\thinspace\char`\? }
\catcode`\!=\active \def!{\thinspace\char`\! }
\catcode`\«=\active \def«{\thinspace\char`\« }
\catcode`\»=\active \def»{\thinspace\char`\» }
}
}
\def\nofrenchpunct{%
\catcode`\:=12
\catcode`\;=12
\catcode`\?=12
\catcode`\!=12
\catcode`\«=12
\catcode`\»=12
}
\frenchpunct
bonjour: monde; oui? non! «aujourd'hui» % opening « does not work, but closing -- » -- does.
\nofrenchpunct
bonjour: monde; oui? non! «aujourd'hui»
\bye
\catcode\`«=\active \def«{\char\`«\thinspace }
? I guess you'd want the thin space to be after the opening quotation mark (guillemet).