From f764ad7379a98ea31b9e492dfa5bd447a2135314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pit--Claudel?= Date: Sun, 7 Aug 2016 15:03:55 -0400 Subject: [PATCH 2/2] Copy all font-lock properties in org-src, not just face * lisp/org-src (org-src-font-lock-fontify-block): Loop over `font-lock-extra-managed-props', thus copying other properties that might be applied using font-lock. An example is composition, applied by `prettify-symbols-mode'. --- lisp/org-src.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/org-src.el b/lisp/org-src.el index 5906721..04f5f62 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -503,11 +503,12 @@ as `org-src-fontify-natively' is non-nil." (unless (eq major-mode lang-mode) (funcall lang-mode)) (org-font-lock-ensure) (let ((pos (point-min)) next) - (while (setq next (next-single-property-change pos 'face)) - (let ((new-face (get-text-property pos 'face))) - (put-text-property - (+ start (1- pos)) (1- (+ start next)) 'face new-face - org-buffer)) + (while (setq next (next-property-change pos)) + (dolist (prop (cons 'face font-lock-extra-managed-props)) + (let ((new-prop (get-text-property pos prop))) + (put-text-property + (+ start (1- pos)) (1- (+ start next)) prop new-prop + org-buffer))) (setq pos next)))) ;; Add org faces (let ((face-name (intern (format "org-block-%s" lang)))) -- 2.7.4