From cb775f9b2f26acb3bb34f357b778b42d70a39eb2 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 12 Jun 2004 21:53:26 +0000 Subject: Enforce that \q may not be used anywhere within \c. It shouldn't be necessary since the whole point of \c should be that the user wants to exercise exact control over the glyphs used, and forbidding it has the useful effect of relieving some backends of having to make difficult decisions: it means the text backend doesn't have to nest two pairs of identical quotes, and the paper backends don't have to downgrade their quote characters if (as is perfectly plausible) the fixed-pitch font doesn't support the same range as the body text fonts. [originally from svn r4277] --- error.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'error.c') diff --git a/error.c b/error.c index 0e90f0c..350e71a 100644 --- a/error.c +++ b/error.c @@ -117,6 +117,11 @@ static void do_error(int code, va_list ap) { sprintf(error, "expected `}' after cross-reference"); flags = FILEPOS; break; + case err_codequote: + fpos = *va_arg(ap, filepos *); + sprintf(error, "unable to nest \\q{...} within \\c{...} or \\cw{...}"); + flags = FILEPOS; + break; case err_missingrbrace: fpos = *va_arg(ap, filepos *); sprintf(error, "unclosed braces at end of paragraph"); -- cgit v1.1