+;;;###autoload
+(define-minor-mode display-time-mode
+ "Toggle display of time, load level, and mail flag in mode lines.
+With a numeric arg, enable this display if arg is positive.
+
+When this display is enabled, it updates automatically every minute.
+If `display-time-day-and-date' is non-nil, the current day and date
+are displayed as well.
+This runs the normal hook `display-time-hook' after each update."
+ :global t :group 'display-time
+ (and display-time-timer (cancel-timer display-time-timer))
+ (setq display-time-timer nil)
+ (setq display-time-string "")
+ (or global-mode-string (setq global-mode-string '("")))
+ (setq display-time-load-average display-time-default-load-average)
+ (if display-time-mode
+ (progn
+ (or (memq 'display-time-string global-mode-string)
+ (setq global-mode-string
+ (append global-mode-string '(display-time-string))))
+ ;; Set up the time timer.
+ (setq display-time-timer
+ (run-at-time t display-time-interval
+ 'display-time-event-handler))
+ ;; Make the time appear right away.
+ (display-time-update)
+ ;; When you get new mail, clear "Mail" from the mode line.
+ (add-hook 'rmail-after-get-new-mail-hook
+ 'display-time-event-handler))
+ (remove-hook 'rmail-after-get-new-mail-hook
+ 'display-time-event-handler)))
+
+(provide 'time)
+
+;;; arch-tag: b9c1623f-b5cb-48e4-b650-482a4d23c5a6