Subject: bug#46092: bug#53507: 27.1; syntax highlight in the eval-expression prompt

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 25 Jan 2022 13:52:56 +0100

ndame <[email-masked]> writes:

> ;; Don't turn on Font Lock mode if we don't have a display (we're running a
> ;; batch job) or if the buffer is invisible (the name starts with a space).
>
> (when (or noninteractive (eq (aref (buffer-name) 0) ?\s))
>  (setq font-lock-mode nil))
>
> https://github.com/emacs-mirror/emacs/blob/master/lisp/font-core.el#L133
>
> If one comments these lines, reevalutes the function and then goes to 
> eval-expression, pastes this code into it:
>
>   (progn (setq font-lock-mode t) (emacs-lisp-mode))
>
> and evals this code right there in context (C-x C-e) then the lisp 
> code in the minibuffer gets font locking.

Yes -- but I don't think this is something we can change at this point.
It's likely to break various things.

So if you want to do font locking things in the minibuffer, you have to
use minibuffer-setup-hook (or one of the other hooks) and set things
explicitly.

So I don't think there's anything to be done on the Emacs side here, but
perhaps I'm misunderstanding what this report is about?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no