Subject: bug#41124: 26.3; highlight regexp not working properly - not updating as you type

From: Michael Heerdegen <[email-masked]>
Date: Thu, 07 May 2020 19:29:25 +0200

jan via "Bug reports for GNU Emacs, the Swiss army knife of text
editors" <[email-masked]> writes:

> First ensure font-lock mode is on. Prefix arg forces it on.
>
>    C-u 1 M-x font-lock-mode
>
> Minibuffer says font lock mode is enabled

@jan: The test that hi-lock uses internally is actually

  (and font-lock-mode (font-lock-specified-p major-mode))

so you need an implemented font-locking in your buffer.  I guess this is
intentional and has its reasons.  But yes, it is surprising.

@Eli: the docstring of `hi-lock-mode' just says:

"In buffers where Font Lock mode is enabled, patterns are
highlighted using font lock."

That's wrong, I think the docstring should be adapted.  _Or_
hi-lock-mode could query the user whether he still wants to enable
hi-locking using font-lock, with the risk of messing up other
highlighting that doesn't come from font-lock.

Michael.