Ver código fonte

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 <kaushal.modi@gmail.com>
<http://permalink.gmane.org/gmane.emacs.orgmode/99495>
Kyle Meyer 9 anos atrás
pai
commit
003a0f1069
1 arquivos alterados com 3 adições e 1 exclusões
  1. 3 1
      lisp/org-src.el

+ 3 - 1
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