I agree that this should be done as part of the font-lock. This issue not only causes inconvenience, but also causes bug #21990, which does not allow htmlfontify to correctly display the highlighting. Hong