Explorar el Código

Fix face problem with deadline warnings days set locally to zero.

Following a report by Bernt Hansen.
Carsten Dominik hace 17 años
padre
commit
d0d632533d
Se han modificado 2 ficheros con 7 adiciones y 2 borrados
  1. 4 0
      ChangeLog
  2. 3 2
      org.el

+ 4 - 0
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  <bzg@altern.org>
 

+ 3 - 2
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))