0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-07-20 16:56:30 +00:00

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

Following a report by Bernt Hansen.
This commit is contained in:
Carsten Dominik 2008-02-29 20:45:21 +01:00
parent 3db26e255f
commit d0d632533d
2 changed files with 7 additions and 2 deletions

View file

@ -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>

5
org.el
View file

@ -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))