Make sure that commented headings appear commented

* lisp/org.el (org-set-font-lock-defaults): Apply 'org-special-keyword
face to commented headings last, so that every markup inside look dim,
as per 'org-special-keyword face.
This commit is contained in:
Ihor Radchenko 2024-03-31 14:49:21 +03:00
parent d3878cb6fe
commit 462bbb213a
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 8 additions and 6 deletions

View File

@ -6025,12 +6025,6 @@ needs to be inserted at a specific position in the font-lock sequence.")
'(org-raise-scripts) ; applies display
;; Code
'(org-activate-code (1 'org-code prepend))
;; COMMENT
(list (format
"^\\*+\\(?: +%s\\)?\\(?: +\\[#[A-Z0-9]\\]\\)? +\\(?9:%s\\)\\(?: \\|$\\)"
org-todo-regexp
org-comment-string)
'(9 'org-special-keyword prepend))
;; Blocks and meta lines
;; Their face is an override - keywords, affiliated
;; keywords, blocks, and block boundaries are all
@ -6046,6 +6040,14 @@ needs to be inserted at a specific position in the font-lock sequence.")
(org-cite-try-load-processor org-cite-activate-processor))
;; prepends faces
'(org-cite-activate))
;; COMMENT
;; Apply this last, after all the markup is highlighted, so
;; that even "bright" markup will become dim.
(list (format
"^\\*+\\(?: +%s\\)?\\(?: +\\[#[A-Z0-9]\\]\\)? +\\(?9:%s\\)\\(?: \\|$\\)"
org-todo-regexp
org-comment-string)
'(9 'org-special-keyword prepend))
'(org-activate-folds))))
(setq org-font-lock-extra-keywords (delq nil org-font-lock-extra-keywords))
(run-hooks 'org-font-lock-set-keywords-hook)