[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CC Mode 5.27 (C); Syntax highlighting after parens in quotes
From: |
Stefan Monnier |
Subject: |
Re: CC Mode 5.27 (C); Syntax highlighting after parens in quotes |
Date: |
01 Jul 2001 16:05:39 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.104 |
>>>>> "Fred" == Fred T Krogh <fkrogh@mathalacarte.com> writes:
> The following illustrates the problem.
> if (my_query("s#remind_num from XBREM where (user_id=#p#) &&
> (remind_id=#vMA#) &&\
> (remind_num < 64) && (down_case = #n)qzg") < 0) return my_exit; // Get
> current reminder status;
> if (my_exit) {
> ..
The problem here is not the terminating \ but the ( in column 0.
To speed-up some operations, font-lock assumes that an open-paren
in column 0 starts a function (try C-M-a and notice that it is also
confused by your code) and that such a beginning of function is outside of
any string or comment, so when it sees you closing " it actually thinks
it's an opening " (since the ( was outside of strings) and will highlight
the rest of the buffer as a string.
Of course, this doesn't always occur because font-lock does not always
make such assumptions, so it might be correctly highlighted at first
but get wrongly re-highlighted later on...
Stefan
- Re: CC Mode 5.27 (C); Syntax highlighting after parens in quotes,
Stefan Monnier <=