emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/org-modern 23347906b8: org-modern-agenda: Respect custo


From: ELPA Syncer
Subject: [elpa] externals/org-modern 23347906b8: org-modern-agenda: Respect customization variables
Date: Sun, 21 Aug 2022 15:57:46 -0400 (EDT)

branch: externals/org-modern
commit 23347906b826656c5054b8e35714a1c3d74bdcc4
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>

    org-modern-agenda: Respect customization variables
---
 org-modern.el | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/org-modern.el b/org-modern.el
index 3aece3d9e1..de28061e98 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -653,28 +653,28 @@ You can specify a font `:family'. The font families 
`Iosevka', `Hack' and
   "Finalize Org agenda highlighting."
   (save-excursion
     (save-match-data
-      ;; Todo keywords
-      (goto-char (point-min))
-      (let ((re (format ": +%s "
-                        (regexp-opt
-                         (append org-todo-keywords-for-agenda
-                                 org-done-keywords-for-agenda) t)))
-            (org-done-keywords org-done-keywords-for-agenda))
-        (while (re-search-forward re nil 'noerror)
-          (org-modern--todo)))
-      ;; Tags
-      (goto-char (point-min))
-      (let ((re (concat "\\( \\)\\(:\\(?:" org-tag-re ":\\)+\\)[ \t]*$")))
-        (while (re-search-forward re nil 'noerror)
-          (org-modern--tag)))
-      ;; Priorities
-      (goto-char (point-min))
-      (while (re-search-forward "\\(\\[\\)#.\\(\\]\\)" nil 'noerror)
-        ;; For some reason the org-agenda-fontify-priorities adds overlays?!
-        (when-let (ov (overlays-at (match-beginning 0))) (overlay-put (car ov) 
'face nil))
-        (put-text-property (match-beginning 0) (match-end 0) 'face 
'org-modern-priority)
-        (put-text-property (match-beginning 1) (match-end 1) 'display " ")
-        (put-text-property (match-beginning 2) (match-end 2) 'display " ")))))
+      (when org-modern-todo
+        (goto-char (point-min))
+        (let ((re (format ": +%s "
+                          (regexp-opt
+                           (append org-todo-keywords-for-agenda
+                                   org-done-keywords-for-agenda) t)))
+              (org-done-keywords org-done-keywords-for-agenda))
+          (while (re-search-forward re nil 'noerror)
+            (org-modern--todo))))
+      (when org-modern-tag
+        (goto-char (point-min))
+        (let ((re (concat "\\( \\)\\(:\\(?:" org-tag-re ":\\)+\\)[ \t]*$")))
+          (while (re-search-forward re nil 'noerror)
+            (org-modern--tag))))
+      (when org-modern-priority
+        (goto-char (point-min))
+        (while (re-search-forward "\\(\\[\\)#.\\(\\]\\)" nil 'noerror)
+          ;; For some reason the org-agenda-fontify-priorities adds overlays?!
+          (when-let (ov (overlays-at (match-beginning 0))) (overlay-put (car 
ov) 'face nil))
+          (put-text-property (match-beginning 0) (match-end 0) 'face 
'org-modern-priority)
+          (put-text-property (match-beginning 1) (match-end 1) 'display " ")
+          (put-text-property (match-beginning 2) (match-end 2) 'display " 
"))))))
 
 ;;;###autoload
 (define-globalized-minor-mode global-org-modern-mode



reply via email to

[Prev in Thread] Current Thread [Next in Thread]