bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#33937: 26.1; mhtml-mode fails to capture font-lock-keywords-case-fol


From: Lars Ingebrigtsen
Subject: bug#33937: 26.1; mhtml-mode fails to capture font-lock-keywords-case-fold-search
Date: Thu, 31 Oct 2019 14:08:34 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Stefan Monnier <monnier@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]