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.
This commit is contained in:
Nicolas Goaziou 2016-01-17 23:49:28 +01:00
parent 02c9dca64c
commit 74bb33d464
1 changed files with 5 additions and 3 deletions

View File

@ -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