From d0d632533dd7a3407da924201b69f6dc2a6fdbb6 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 29 Feb 2008 20:45:21 +0100 Subject: [PATCH] Fix face problem with deadline warnings days set locally to zero. Following a report by Bernt Hansen. --- ChangeLog | 4 ++++ org.el | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e767034db..802816e12 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,10 @@ (org-agenda-manipulate-query-subtract-regexp) (org-agenda-manipulate-query): New functions. (org-agenda-query-register): New option. + (org-agenda-deadline-face): New argument wdays, to catch the + special case wdays=0. + (org-agenda-get-deadlines): Pass wdays to + `org-agenda-deadline-face'. 2008-02-28 Bastien Guerry diff --git a/org.el b/org.el index 8b57f7beb..9e681f9ea 100644 --- a/org.el +++ b/org.el @@ -21843,7 +21843,7 @@ the documentation of `org-diary'." head category tags timestr)))) (setq txt org-agenda-no-heading-message)) (when txt - (setq face (org-agenda-deadline-face dfrac)) + (setq face (org-agenda-deadline-face dfrac wdays)) (org-add-props txt props 'org-marker (org-agenda-new-marker pos) 'org-hd-marker (org-agenda-new-marker pos1) @@ -21857,9 +21857,10 @@ the documentation of `org-diary'." (push txt ee)))))) (nreverse ee))) -(defun org-agenda-deadline-face (fraction) +(defun org-agenda-deadline-face (fraction &optional wdays) "Return the face to displaying a deadline item. FRACTION is what fraction of the head-warning time has passed." + (if (equal wdays 0) (setq fraction 1.)) (let ((faces org-agenda-deadline-faces) f) (catch 'exit (while (setq f (pop faces))