> (defalias 'org-font-lock-ensure
> - (if (fboundp 'org-font-lock-ensure)
> + (if (fboundp 'font-lock-ensure)
> #'font-lock-ensure
> - (lambda (_beg _end) (font-lock-fontify-buffer))))
> + (lambda (&optional _beg _end) (font-lock-fontify-buffer))))
Looks good.
> (unless (eq major-mode lang-mode) (funcall lang-mode))
> - (org-font-lock-ensure)
> + ;; Avoid `font-lock-ensure', which does not display fonts in
> + ;; source block.
> + (font-lock-fontify-buffer)
Intuitively, this looks like a wrong fix. Do you have a reproducible
recipe showing the problem that you're trying to fix?
Stefan