This bites on a frustratingly regular basis. Put the following in a
class Fubar :
public Foo, // Foo fontified as a type, at first
public Bar // Bar fontified as a type, at first
Foo bar(Snafu snafu, // Types, function, variable fontified, at first
Foo bar(Snafu *snafu, // Types, function, variable fontified, at first
Then emacs -Q fubar.cpp. I see Foo, Bar and Snafu fontified as types even
where declaring functions and variables. The corresponding functions and
variables are fontified correctly. This is great!
Then do the following.
1. Append a space to the first (or second) commented line. Bug:
fontification of Foo (and/or Bar) is removed.
2. Append a space to the third commented line. Bug: fontification of Foo
and bar is removed from that line.
3. Append a space to the fourth commented line. Bug: fontification of Foo,
bar, Snafu and snafu is removed from that line.
Somewhat spookily, if you then repeat (2), then the fourth commented line
(3) gets fontified correctly after the deferral delay.
I think this is some sort of problem with Jit Lock mode multiline
fontification, at least for (2) and (3), since Lazy Lock mode works ok. (Of
course, Lazy Lock mode is now depreciated and lazy-lock-mode is not
Stefan Monnier kindly posted a possible partial fix (see
that thread went into a discussion about the font-lock-multiline text
property. I don't know how valid the approach is now (and obviously the
patch was not checked in).
This email message is intended for the named recipient only. It may be privileged and/or confidential. If you are not the named recipient of this email please notify us immediately and do not copy it or use it for any purpose, nor disclose its contents to any other person. Misys Banking Systems is a trading name of Misys International Banking Systems Limited which is registered in England and Wales under company registration number 00971479 and with its registered office address at Burleigh House, Chapel Oak, Salford Priors, Evesham WR11 8SP. THIS E-MAIL DOES NOT CONSTITUTE THE COMMENCEMENT OF LEGAL RELATIONS BETWEEN YOU AND MISYS INTERNATIONAL BANKING SYSTEMS LIMITED. PLEASE REFER TO THE EXECUTED CONTRACT BETWEEN YOU AND THE RELEVANT MEMBER OF THE MISYS GROUP FOR THE IDENTITY OF THE CONTRACTING PARTY WITH WHICH YOU ARE DEALING.