Commit 003a0f10 authored by Kyle Meyer's avatar Kyle Meyer
Browse files

org-src: Use font-lock-fontify-buffer for blocks

* lisp/org-src.el (org-src-font-lock-fontify-block): Use
  font-lock-fontify-buffer because font-lock-ensure does not display
  source block fonts.

When font-lock-fontify-buffer was originally replaced by
font-lock-ensure, source block fonts were not being displayed, so
99f99994 reverted this change.  However, a backport (d81e6b52) from the
Emacs repo, which was merged to master in 0d0d0ad5

, reverted this again.

Reported-by: default avatarKaushal Modi <>
parent ff92583e
......@@ -497,7 +497,9 @@ as `org-src-fontify-natively' is non-nil."
(delete-region (point-min) (point-max))
(insert string " ") ;; so there's a final property change
(unless (eq major-mode lang-mode) (funcall lang-mode))
;; Avoid `font-lock-ensure', which does not display fonts in
;; source block.
(setq pos (point-min))
(while (setq next (next-single-property-change pos 'face))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment