summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2012-09-17 18:57:58 +0200
committerBastien Guerry <bzg@altern.org>2012-09-17 18:57:58 +0200
commita67676809c042805dfeeb9d677d4dafc0df7c369 (patch)
tree8b8bdefd0a60ed23a5174f229ee0132147340e01
parenta86fd717196ffc73ecb201b2757a96483a810078 (diff)
downloadorg-mode-a67676809c042805dfeeb9d677d4dafc0df7c369.tar.gz
org-agenda.el: Fix the declaration/check of org-habit variables
* org-agenda.el (org-habit-show-all-today): Only use defvar to silent the byte-compiler. (org-agenda-get-scheduled): Check whether some org-habit.el options have been defined. Thanks to Robert Horn for reporting this.
-rw-r--r--lisp/org-agenda.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 557562f..b24fd7b 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -90,7 +90,7 @@
(defvar org-mobile-force-id-on-agenda-items) ; defined in org-mobile.el
(defvar org-habit-show-habits) ; defined in org-habit.el
(defvar org-habit-show-habits-only-for-today)
-(defvar org-habit-show-all-today nil)
+(defvar org-habit-show-all-today)
;; Defined somewhere in this file, but used before definition.
(defvar org-agenda-buffer-name "*Org Agenda*")
@@ -5706,6 +5706,7 @@ FRACTION is what fraction of the head-warning time has passed."
;; org-is-habit-p uses org-entry-get, which is expansive
;; so we go extra mile to only call it once
(and todayp
+ (boundp 'org-habit-show-all-today)
org-habit-show-all-today
(setq did-habit-check-p t)
(setq habitp (and (functionp 'org-is-habit-p)
@@ -5730,6 +5731,7 @@ FRACTION is what fraction of the head-warning time has passed."
(if habitp
(if (or (not org-habit-show-habits)
(and (not todayp)
+ (boundp 'org-habit-show-habits-only-for-today)
org-habit-show-habits-only-for-today))
(throw :skip nil))
(if (and