[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern c46436fda5: Add org-modern-todo-faces (Fix #
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern c46436fda5: Add org-modern-todo-faces (Fix #28) |
Date: |
Tue, 22 Mar 2022 14:57:38 -0400 (EDT) |
branch: externals/org-modern
commit c46436fda56515d33fdc366e60c4cc4d50ce4247
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Add org-modern-todo-faces (Fix #28)
---
org-modern.el | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/org-modern.el b/org-modern.el
index 842a2e1ca4..49e6a1745b 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -133,6 +133,18 @@ Set to nil to disable styling checkboxes."
"Prettify todo keywords, see `org-todo-keywords'."
:type 'boolean)
+(defcustom org-modern-todo-faces nil
+ "Faces for todo keywords.
+This is an alist, with todo keywords in the car
+and faces in the cdr. Example:
+
+ (setq org-modern-todo-faces
+ '((\"TODO\" :background \"red\"
+ :foreground \"yellow\")))"
+ :type '(repeat
+ (cons (string :tag "Keyword")
+ (sexp :tag "Face "))))
+
(defcustom org-modern-tag t
"Prettify tags in headlines, e.g., :tag1:tag2:."
:type 'boolean)
@@ -310,9 +322,11 @@ You can specify a font `:family'. The font families
`Iosevka', `Hack' and
(put-text-property
beg end
'face
- (if (member todo org-done-keywords)
- 'org-modern-done
- 'org-modern-todo))))
+ (if-let (face (cdr (assoc todo org-modern-todo-faces)))
+ `(:inherit (,face org-modern-label))
+ (if (member todo org-done-keywords)
+ 'org-modern-done
+ 'org-modern-todo)))))
(defun org-modern--timestamp ()
"Prettify timestamps."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org-modern c46436fda5: Add org-modern-todo-faces (Fix #28),
ELPA Syncer <=