From 003a0f10695f035e844d844eacb1a86a6d2df934 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 4 Aug 2015 23:50:59 -0400 Subject: [PATCH] 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 99f9999 reverted this change. However, a backport (d81e6b5) from the Emacs repo, which was merged to master in 0d0d0ad, reverted this again. Reported-by: Kaushal Modi --- lisp/org-src.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 96d21d09d..85294941c 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -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)) - (font-lock-ensure) + ;; Avoid `font-lock-ensure', which does not display fonts in + ;; source block. + (font-lock-fontify-buffer) (setq pos (point-min)) (while (setq next (next-single-property-change pos 'face)) (put-text-property -- 2.11.4.GIT