-- Andy Piper <andy(a)xemacs.org> spake thusly:
public class test
{
public int foo(int i /* hello */, // a comment
short s, test t)
{
foo(1 /* oops */, 2, this)
break;
/* a comment
foo(1,2,this);
*/
}
}
If you fontify the buffer the third foo shows up in comment color. If
you comment out the /* and */ it is not shown in correct colors -
even if you go to the line and hit tab. THe only way you can get it
colored correctly is to modify the line somehow (e.g. M-<space>
<tab>) or to refontify the whole buffer.
Of course this may just be a font-lock bug.
I believe it's a font-lock bug. I get the same behavior in Emacs 20.7
and XEmacs 21.1. I'm pretty sure that Emacs has a graceful way of
handling this, but I haven't yet managed to get XEmacs to deal with
this sort of thing properly. Presumably with lazy-lock or lazy-shot,
the entire rest of the buffer should be refontified after any change in
text. We don't currently do this, but it's been on my list of things to
fix for some time.