summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichaƫl Cadilhac <michael@cadilhac.name>2019-08-28 16:26:06 -0500
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-09-05 18:53:26 +0200
commit876a4419dd776dd8ce262af93a7abc9daa3fcb25 (patch)
treea5a584d90c4a8d092900a55ca38cdc917a889073
parent893866f86ba771d2721976139132f4292bde2866 (diff)
downloadorg-mode-876a4419dd776dd8ce262af93a7abc9daa3fcb25.tar.gz
Fontify drawers correctly.
* lisp/org.el (org-fontify-drawers): Fix face used, fix range of text properties. (org-set-font-lock-defaults): Fontify drawers after keywords.
-rw-r--r--lisp/org.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/org.el b/lisp/org.el
index db957a1..f383f99 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5356,9 +5356,10 @@ by a #."
"Fontify drawers."
(when (re-search-forward org-drawer-regexp limit t)
(add-text-properties
- (match-beginning 0) (match-end 0)
- '(font-lock-fontified t face org-special-keyword))
- (org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
+ (line-beginning-position) (line-beginning-position 2)
+ '(font-lock-fontified t face org-drawer))
+ (org-remove-flyspell-overlays-in
+ (line-beginning-position) (line-beginning-position 2))
t))
(defun org-fontify-macros (limit)
@@ -5612,12 +5613,12 @@ needs to be inserted at a specific position in the font-lock sequence.")
'("^[ \t]*| *\\([#*]\\) *|" (1 'org-formula t))
'("^[ \t]*|\\( *\\([$!_^/]\\) *|.*\\)|" (1 'org-formula t))
'("| *\\(<[lrc]?[0-9]*>\\)" (1 'org-formula t))
- ;; Drawers
- '(org-fontify-drawers)
;; Properties
(list org-property-re
'(1 'org-special-keyword t)
'(3 'org-property-value t))
+ ;; Drawers
+ '(org-fontify-drawers)
;; Link related fontification.
'(org-activate-links)
(when (memq 'tag lk) '(org-activate-tags (1 'org-tag prepend)))