diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-02 10:36:32 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-12-02 13:01:22 +0100 |
commit | 6d5e207c7dab5932cff5a7b81a912739e291d19c (patch) | |
tree | b75853b30b4407cc83b4cdc2395e22a90730c86e | |
parent | e336f39ce7cb101d1fe735e2e35fb76d93bfe173 (diff) | |
download | org-mode-6d5e207c7dab5932cff5a7b81a912739e291d19c.tar.gz |
org-agenda: Small refactoring
* lisp/org-agenda.el (org-agenda-deadline-face): Small refactoring.
-rw-r--r-- | lisp/org-agenda.el | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 024773b..88b2ff8 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -6185,10 +6185,7 @@ specification like [h]h:mm." (defun org-agenda-deadline-face (fraction) "Return the face to displaying a deadline item. FRACTION is what fraction of the head-warning time has passed." - (let ((faces org-agenda-deadline-faces) f) - (catch 'exit - (while (setq f (pop faces)) - (if (>= fraction (car f)) (throw 'exit (cdr f))))))) + (assoc-default fraction org-agenda-deadline-faces #'<=)) (defun org-agenda-get-scheduled (&optional deadlines with-hour) "Return the scheduled information for agenda display. |