Browse Source

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.
Nicolas Goaziou 9 years ago
parent
commit
74bb33d464
1 changed files with 5 additions and 3 deletions
  1. 5 3
      lisp/org.el

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