summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-30 00:39:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-30 00:39:37 -0400
commit706129c0c4c3f96fabd5e0bd00bca39b1e9a7347 (patch)
treea5c64cd4ddfdac4fdf2fd203426cc2bb9e55d91d
parentaa4b407d4db0d5920ce587a72723ccf8727b43e0 (diff)
downloadorg-mode-706129c0c4c3f96fabd5e0bd00bca39b1e9a7347.tar.gz
Fixed incorrect value returned from `org-habit-deadline'
-rw-r--r--lisp/org-habit.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 098f24d..97c2bf7 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -178,8 +178,10 @@ This list represents a \"habit\" for the rest of this module."
(defsubst org-habit-deadline (habit)
(let ((deadline (nth 2 habit)))
(or deadline
- (+ (org-habit-scheduled habit)
- (1- (org-habit-scheduled-repeat habit))))))
+ (if (nth 3 habit)
+ (+ (org-habit-scheduled habit)
+ (1- (org-habit-scheduled-repeat habit)))
+ (org-habit-scheduled habit)))))
(defsubst org-habit-deadline-repeat (habit)
(or (nth 3 habit)
(org-habit-scheduled-repeat habit)))