48 |
:group 'calendar |
:group 'calendar |
49 |
:version "20.3") |
:version "20.3") |
50 |
|
|
51 |
|
(defvar midnight-timer nil |
52 |
|
"Timer running the `midnight-hook' `midnight-delay' seconds after midnight. |
53 |
|
Use `cancel-timer' to stop it and `midnight-delay-set' to change |
54 |
|
the time when it is run.") |
55 |
|
|
56 |
(defcustom midnight-mode nil |
(defcustom midnight-mode nil |
57 |
"*Non-nil means run `midnight-hook' at midnight. |
"*Non-nil means run `midnight-hook' at midnight. |
58 |
Setting this variable outside customize has no effect; |
Setting this variable outside customize has no effect; |
209 |
(multiple-value-bind (sec min hrs) (decode-time) |
(multiple-value-bind (sec min hrs) (decode-time) |
210 |
(- (* 24 60 60) (* 60 60 hrs) (* 60 min) sec))) |
(- (* 24 60 60) (* 60 60 hrs) (* 60 min) sec))) |
211 |
|
|
|
(defvar midnight-timer nil |
|
|
"Timer running the `midnight-hook' `midnight-delay' seconds after midnight. |
|
|
Use `cancel-timer' to stop it and `midnight-delay-set' to change |
|
|
the time when it is run.") |
|
|
|
|
212 |
;;;###autoload |
;;;###autoload |
213 |
(defun midnight-delay-set (symb tm) |
(defun midnight-delay-set (symb tm) |
214 |
"Modify `midnight-timer' according to `midnight-delay'. |
"Modify `midnight-timer' according to `midnight-delay'. |