diff options
author | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-05-25 20:23:43 +0200 |
---|---|---|
committer | Nicolas Goaziou <n.goaziou@gmail.com> | 2012-05-25 20:23:43 +0200 |
commit | 8b4652121173b8cee9f9cb6c8996f23752677f0e (patch) | |
tree | 22c7e0882546474efde2c099e814d84b38d22653 | |
parent | 4e4e161f8f1563a1dabbef5e721f17acec2ddaf7 (diff) |
Restrict priorities fontification to headlines and inlinetasksrelease_7.8.11
* lisp/org.el (org-font-lock-add-priority-faces): Restrict priorities
fontification to headlines and inlinetasks.
-rw-r--r-- | lisp/org.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/org.el b/lisp/org.el index b3ae935cc..972f7801a 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5990,14 +5990,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. |