summaryrefslogtreecommitdiff
path: root/lisp/org/org-habit.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/org-habit.el')
-rw-r--r--lisp/org/org-habit.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/org/org-habit.el b/lisp/org/org-habit.el
index e1d13b8325c..f76f0f2131a 100644
--- a/lisp/org/org-habit.el
+++ b/lisp/org/org-habit.el
@@ -90,7 +90,7 @@ It will be green even if it was done after the deadline."
:type 'boolean)
(defcustom org-habit-scheduled-past-days nil
- "Value to use instead of `org-scheduled-past-days', for habits only.
+"Value to use instead of `org-scheduled-past-days', for habits only.
If nil, `org-scheduled-past-days' is used.
@@ -343,7 +343,10 @@ current time."
(if (and in-the-past-p
(not last-done-date)
(not (< scheduled now)))
- '(org-habit-clear-face . org-habit-clear-future-face)
+ (if (and all-done-dates (= (car all-done-dates) start))
+ ;; This is the very first done of this habit.
+ '(org-habit-ready-face . org-habit-ready-future-face)
+ '(org-habit-clear-face . org-habit-clear-future-face))
(org-habit-get-faces
habit start
(and in-the-past-p
@@ -409,7 +412,7 @@ current time."
'help-echo
(concat (format-time-string
(org-time-stamp-format)
- (time-add starting (days-to-time (- start (time-to-days starting)))))
+ (time-add starting (days-to-time (- start (time-to-days starting)))))
(if donep " DONE" ""))
graph))
(setq start (1+ start)
@@ -436,7 +439,7 @@ current time."
habit
(time-subtract moment (days-to-time org-habit-preceding-days))
moment
- (time-add moment (days-to-time org-habit-following-days))))))
+ (time-add moment (days-to-time org-habit-following-days))))))
(forward-line)))))
(defun org-habit-toggle-habits ()