diff options
| author | Karl Heuer | 1996-07-13 17:53:53 +0000 |
|---|---|---|
| committer | Karl Heuer | 1996-07-13 17:53:53 +0000 |
| commit | 92373e943a4d0c20bf32b6cd68dd82d1077ca008 (patch) | |
| tree | be40f431d4907307b37c1ca80656be07bba16e3b | |
| parent | e07d54499f933e4cdcc2810013793695fc1adc83 (diff) | |
| download | emacs-92373e943a4d0c20bf32b6cd68dd82d1077ca008.tar.gz emacs-92373e943a4d0c20bf32b6cd68dd82d1077ca008.zip | |
(display-time): Fix start time for run-at-time.
| -rw-r--r-- | lisp/time.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/time.el b/lisp/time.el index 473135d5700..08c2f86c82c 100644 --- a/lisp/time.el +++ b/lisp/time.el | |||
| @@ -71,7 +71,10 @@ After each update, `display-time-hook' is run with `run-hooks'." | |||
| 71 | ;; Setup the time timer. | 71 | ;; Setup the time timer. |
| 72 | (and display-time-timer (cancel-timer display-time-timer)) | 72 | (and display-time-timer (cancel-timer display-time-timer)) |
| 73 | (setq display-time-timer | 73 | (setq display-time-timer |
| 74 | (run-at-time nil display-time-interval 'display-time-event-handler)) | 74 | ;; Start timer at the beginning of the current minute so that |
| 75 | ;; it updates as soon as the minute changes. | ||
| 76 | (run-at-time (apply 'encode-time 0 (cdr (decode-time))) | ||
| 77 | display-time-interval 'display-time-event-handler)) | ||
| 75 | ;; When you get new mail, clear "Mail" from the mode line. | 78 | ;; When you get new mail, clear "Mail" from the mode line. |
| 76 | (add-hook 'rmail-after-get-new-mail-hook 'display-time-event-handler)) | 79 | (add-hook 'rmail-after-get-new-mail-hook 'display-time-event-handler)) |
| 77 | 80 | ||