From 9164da8b1f0f4ac8c8859a26181761411cf6bdd8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 27 Apr 2017 15:07:47 -0400 Subject: [PATCH] lang/org: remove org-list-bullet face (use org-list-dt); polish custom font-lock keywords --- modules/lang/org/config.el | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index c3b550b9c..fdc361d5b 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -180,25 +180,20 @@ ext-regexp "\\)\\(\\]\\]\\|>\\|'\\)?") . 2) (,(concat "<\\(http://.+\\." ext-regexp "\\)>") . 1)))) - ;; Fontify checkboxes and dividers - (defface org-list-bullet - '((t (:inherit font-lock-keyword-face))) - "Face for list bullets" - :group 'doom) + ;;; Custom fontification ;; I like how org-mode fontifies checked TODOs and want this to extend to ;; checked checkbox items, so we remove the old checkbox highlight rule... (font-lock-remove-keywords - 'org-mode - '(("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- X]\\]\\)" - 1 'org-checkbox prepend))) + 'org-mode '(("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- X]\\]\\)" + 1 'org-checkbox prepend))) (font-lock-add-keywords 'org-mode '(;; ...and replace it with my own - ("^[ \t]*\\(\\(?:[-+]\\|[0-9]+[).]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[X\\][^\n]*\n\\)" + ("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[X\\][^\n]*\n\\)" 1 'org-headline-done t) ("^[ \t]*\\(?:[-+*]\\|[0-9]+[.)]\\)[ \t]+\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\(\\[[- ]\\]\\)" - 1 'org-checkbox prepend) + 1 'org-checkbox append) ;; Also highlight list bullets - ("^ *\\([-+]\\|[0-9]+[).]\\) " 1 'org-list-bullet append) + ("^ *\\([-+]\\|[0-9]+[).]\\) " 1 'org-list-dt append) ;; and separators ("^ *\\(-----+\\)$" 1 'org-meta-line)))