[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern 71696afa12 1/4: org-modern--keyword: Minor s
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern 71696afa12 1/4: org-modern--keyword: Minor simplification |
Date: |
Fri, 3 Jun 2022 10:57:54 -0400 (EDT) |
branch: externals/org-modern
commit 71696afa1251653c91847b6befad64df84c55b97
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
org-modern--keyword: Minor simplification
---
org-modern.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/org-modern.el b/org-modern.el
index cd521d853a..ed6a4f0eb1 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -291,11 +291,12 @@ You can specify a font `:family'. The font families
`Iosevka', `Hack' and
(defun org-modern--keyword ()
"Prettify keywords according to `org-modern-keyword'."
- (if-let (rep (cdr (assoc (match-string 2) org-modern-keyword)))
- (if (eq rep t)
- (put-text-property (match-beginning 1) (match-end 1) 'invisible t)
- (put-text-property (match-beginning 0) (match-end 0) 'display
- (propertize rep 'face 'org-modern-symbol)))))
+ (when-let (rep (cdr (or (assoc (match-string 2) org-modern-keyword)
+ (assq t org-modern-keyword))))
+ (if (stringp rep)
+ (put-text-property (match-beginning 0) (1+ (match-end 0)) 'display
+ (propertize rep 'face 'org-modern-symbol))
+ (put-text-property (match-beginning 1) (match-end 1) 'invisible t))))
(defun org-modern--statistics ()
"Prettify headline todo statistics."