[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: C++-mode: Syntax highlighting: wrong color for funct
From: |
Stefan Monnier |
Subject: |
Re: address@hidden: C++-mode: Syntax highlighting: wrong color for function identifier depending on the kind of whitespace that follows] |
Date: |
Wed, 09 Mar 2005 17:35:23 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> [The discussion is about a font-locking problem reported in CC Mode: The
> user types the start of a C function, but puts a NL in the middle:
> void function
> (int x);
> The second line gets incorrectly fontified, because in its
> after-change-functions, font-lock considers only that line in and of
> itself.]
[...]
> However: I did complain about this shortcoming of font-lock on
> gnu.emacs.bug way back, on Friday 10th May 2002 (Subject: Font-lock:
> Major mode should be able to specify region to fontify. Message-Id:
> <address@hidden>), and that post of mine contained a patch to add
> the facility to font-lock. Nobody apart from Kim Storm (who objected
> (quite reasonably) to the prolix function names I'd used) responded to
> the post at the time, and nothing happened. That's when I decided that
> advising font-lock was the least bad way of solving the problem.
Hmm... I can't remember such a post and I have a hard time imagining why
I wouldn't have jumped on it.
Could you explain smoe more about your two cases (the one in awk and the
one in the subject of this article):
- how do they use your new before-font-lock-after-change-function hook?
- why can't they use the font-lock-multiline property?
- why can't they use the jit-lock-defer-multiline property?
This will allow us the better judge which is the better course of action.
Using advice on font-lock functions from awk-mode is pretty ugly, so it's
important we come up with a better way to solve this issue.
Stefan