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

Previous Next

Package: emacs;

Reported by: Andrew T <summerfallsaway <at> gmail.com>

Date: Tue, 21 May 2019 00:32:01 UTC

Severity: minor

Tags: confirmed

Merged with 30263

Found in versions 26.0.91, 26.2

Full log


Message #10 received at 35815 <at> debbugs.gnu.org (full text, mbox):

From: Tom Tromey <tom <at> tromey.com>
To: Andrew T <summerfallsaway <at> gmail.com>
Cc: 35815 <at> debbugs.gnu.org
Subject: Re: bug#35815: 26.2; mhtml-mode (in HTML+CSS and HTML+JS) doesn't
 respect Whitespace Mode face settings
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




This bug report was last modified 5 years and 21 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.