summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2012-05-25 20:24:58 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2012-05-25 20:24:58 +0200
commit6cddf7425096a743c02b9a17ad8e12b61f514210 (patch)
tree83955ffcabfeb7796af8198ca305d313e3913f85
parent8d96bbc5c3bcac8e4059779ebb3ada6a0bb1d2da (diff)
parent8b4652121173b8cee9f9cb6c8996f23752677f0e (diff)
downloadorg-mode-6cddf7425096a743c02b9a17ad8e12b61f514210.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 3d15e72..cbbfadb 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6039,14 +6039,15 @@ When FACE-OR-COLOR is not a string, just return it."
(defun org-font-lock-add-priority-faces (limit)
"Add the special priority faces."
(while (re-search-forward "\\[#\\([A-Z0-9]\\)\\]" limit t)
- (add-text-properties
- (match-beginning 0) (match-end 0)
- (list 'face (or (org-face-from-face-or-color
- 'priority 'org-special-keyword
- (cdr (assoc (char-after (match-beginning 1))
- org-priority-faces)))
- 'org-special-keyword)
- 'font-lock-fontified t))))
+ (when (save-match-data (org-at-heading-p))
+ (add-text-properties
+ (match-beginning 0) (match-end 0)
+ (list 'face (or (org-face-from-face-or-color
+ 'priority 'org-special-keyword
+ (cdr (assoc (char-after (match-beginning 1))
+ org-priority-faces)))
+ 'org-special-keyword)
+ 'font-lock-fontified t)))))
(defun org-get-tag-face (kwd)
"Get the right face for a TODO keyword KWD.