Subject: bug#35815: 26.2; mhtml-mode (in HTML+CSS and HTML+JS) doesn't respect Whitespace Mode face settings

From: Tom Tromey <[email-masked]>
Date: Mon, 25 May 2020 10:27:43 -0600

Andrew> However, MHTML Mode, within CSS or JavaScript blocks, doesn't respect
Andrew> these settings. The dots representing all spaces display in the default
Andrew> foreground color, or in the color of the nearest highlighted text
Andrew> token.

I think the bug here is that whitespace mode ultimately calls
font-lock-add-keywords to do its work.  However, mhtml-mode captures the
value of font-lock-keywords on a per-submode basis.  So, the change is
not detected.

mhtml probably needs some form of indirection in font-lock-keywords, so
it can apply the subregion matchers as well as any introduced by other modes.
I'm not sure there's a way to do this today.  The easiest would be some
form of a function in the list, where the function would return
font-lock-keywords rather than matches.

Tom