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

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

bug#39597: 27.0.60: M-x occur adds fontification to fundamental-mode


From: Kévin Le Gouguec
Subject: bug#39597: 27.0.60: M-x occur adds fontification to fundamental-mode
Date: Tue, 25 Feb 2020 21:45:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Juri Linkov <juri@linkov.net> writes:

>> [1] E.g. (I was about to report this as a distinct issue… someday…)
>>
>>     C-x b foo
>>     foo RET bar RET baz RET
>>     M-s h r a RET RET
>>     aaaa
>>
>>     ⇒ In all modes *but* fundamental-mode, hi-lock-mode dynamically
>>     highlights new matches (e.g. the added "aaaa" string here).
>>
>>     This bug is not strictly related to the current one, since the
>>     former has been with us since at least 26.3, but that does make me
>>     wonder whether both issues could be solved by turning some font-lock
>>     knob in fundamental-mode…
>
> Searching for "font-lock-specified-p" in hi-lock.el
> shows these fragments of code.  This first condition decides
> whether to use font-lock for highlighting matches
> that returns nil in fundamental-mode:
>
>       (if (and font-lock-mode (font-lock-specified-p major-mode))
>
>       ;; FIXME: Calling `font-lock-remove-keywords' causes
>       ;; `font-lock-specified-p' to go from nil to non-nil (because it
>       ;; calls font-lock-set-defaults).  This is yet-another bug in
>       ;; font-lock-add/remove-keywords, which we circumvent here by
>       ;; testing `font-lock-fontified' (bug#19796).

Thanks, I'll look into this SomeDay™ before I submit a bug report then.

And thank you for fixing the other bug on emacs-27 and master!





reply via email to

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