From 74bb33d4648cdecfc414389016d545ce74bf9c3e Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Sun, 17 Jan 2016 23:49:28 +0100 Subject: [PATCH] Fix fontification of properties with an underscore * lisp/org.el (org-do-latex-and-related): Prevent properties with an underscore from being fontified like a subscript. --- lisp/org.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index b9ab92ec6..1c7dd7f90 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -6170,9 +6170,11 @@ done, nil otherwise." (when (org-string-nw-p org-latex-and-related-regexp) (catch 'found (while (re-search-forward org-latex-and-related-regexp limit t) - (unless (memq (car-safe (get-text-property (1+ (match-beginning 0)) - 'face)) - '(org-code org-verbatim underline)) + (unless + (cl-some + (lambda (f) + (memq f '(org-code org-verbatim underline org-special-keyword))) + (face-at-point nil t)) (let ((offset (if (memq (char-after (1+ (match-beginning 0))) '(?_ ?^)) 1