GNU bug report logs -
#33937
26.1; mhtml-mode fails to capture font-lock-keywords-case-fold-search
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Mon, 31 Dec 2018 15:15:02 UTC
Severity: normal
Tags: fixed
Found in version 26.1
Fixed in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 33937 <at> debbugs.gnu.org (full text, mbox):
Leo Liu <sdl.web <at> gmail.com> writes:
> In mhtml-mode moving into <script>...</script> doesn't set up
> font-lock-keywords-case-fold-search properly, which still has the value
> carried over from html-mode.
>
> The reason is font-lock doesn't make font-lock-keywords-case-fold-search
> buffer-local when its value is nil thus it is skipped by
> mhtml--construct-submode.
This is due to
commit 558ca3c1225f6035442733d5d3fb5fd4c40a0a45
Author: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Tue Feb 12 16:49:21 2008 +0000
(font-lock-set-defaults): Unset previously set variables when needed.
which does this with many of the font-lock variables:
;; Case fold during regexp fontification?
- (when (nth 2 defaults)
- (set (make-local-variable 'font-lock-keywords-case-fold-search) t))
+ (if (nth 2 defaults)
+ (set (make-local-variable 'font-lock-keywords-case-fold-search) t)
+ (kill-local-variable 'font-lock-keywords-case-fold-search))
It's slightly puzzling -- font-lock-keywords-case-fold-search is
permanently buffer-local, but I guess that puzzlement was there before
this patch, but the kill-local-variable thing is what makes mhtlm not
work.
Stefan, do you remember the reason for this change?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 267 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.