[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: font-lock-mode causes paren-matching to go haywire in c++-mode
From: |
Stefan Monnier |
Subject: |
Re: font-lock-mode causes paren-matching to go haywire in c++-mode |
Date: |
29 Mar 2004 13:21:10 -0500 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
>>>>> "Benjamin" == Benjamin Rutt <address@hidden> writes:
> Recipe for reproducing the bug:
> 1) In current CVS head, put the following C++ code in> bug.cpp (cut
> between the ----- lines):
> -----------------------------------------------------------------------------
> int StormIndexingClient::chooseTable()
> {
> int idx = -1;
> if ((idx < 1) ||
> (idx > (int)len)) {
> fprintf(stderr, "ERROR: invalid input %s\n", line);
> }
> idx--;
> return idx;
> }
> -----------------------------------------------------------------------------
> 2) run emacs -q bug.cpp, and verify you're in c++-mode
> 3) type M-x font-lock-mode RET
> 4) put cursor on line 5 of the resulting buffer (line numbering
> starting with 1)
> 5) place point on the '(' character at the beginning of the "(idx > ..."
> expression
> 6) press C-M-n...instead of getting placed on the matching paren, you get
> placed on the '>' character.
Yes, if you do C-x u when you are on the > character, you'll see that it has
a syntax-table text-property which makes it behave like a close-paren.
I've tried to figure out where and why this happens in the CC-mode code,
but I got lost.
Martin could you take a look at it?
Stefan