diff options
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r-- | lisp/acdw.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index a6fddfe..fcab61b 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | ;;; Code: | 20 | ;;; Code: |
21 | 21 | ||
22 | (require 'diary-lib) | ||
23 | |||
22 | ;;; Define a directory and an expanding function | 24 | ;;; Define a directory and an expanding function |
23 | 25 | ||
24 | (defmacro +define-dir (name directory &optional docstring inhibit-mkdir) | 26 | (defmacro +define-dir (name directory &optional docstring inhibit-mkdir) |
@@ -94,7 +96,11 @@ itself." | |||
94 | ;; sunset-command. | 96 | ;; sunset-command. |
95 | (funcall sunset-command) | 97 | (funcall sunset-command) |
96 | (run-at-time sunrise nil sunrise-command)) | 98 | (run-at-time sunrise nil sunrise-command)) |
97 | ((time-less-p nil sunset-time) (run-at-time sunset nil sunset-command)) | 99 | ((time-less-p nil sunset-time) |
100 | ;; If it isn't sunset yet, it's still light---so we need to run the | ||
101 | ;; sunrise-command. | ||
102 | (funcall sunrise-command) | ||
103 | (run-at-time sunset nil sunset-command)) | ||
98 | (t (run-at-time "12:00am" nil sunset-command))) | 104 | (t (run-at-time "12:00am" nil sunset-command))) |
99 | ;; Reset everything at midnight | 105 | ;; Reset everything at midnight |
100 | (unless reset | 106 | (unless reset |