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
View this message in rfc822 format
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> ;; 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?
>
> I can't remember the specific case, but I remember that it was basically
> the inverse situation where font-lock-keywords-case-fold-search was left
> at `t` instead of resetting it to the default nil.
>
> I guess we should just
>
> (setq-local font-lock-keywords-case-fold-search (nth 2 defaults))
>
> instead,
I've now done this change, which should fix the reported problem. But
I'm slightly worried that this may have some impact if there's a global
setting somewhere that should be respected... Not for
font-lock-keywords-case-fold-search (which is always buffer-local), but
for font-lock-syntax-table and font-lock-keywords-only.
Hm... perhaps I should have left those two alone, although it seems odd
to treat them differently...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.