diff options
author | Richard M. Stallman <rms@gnu.org> | 1998-01-05 06:04:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1998-01-05 06:04:35 +0000 |
commit | 3b67a1bf9ad22468e62450be17b83b9bf54bb1a9 (patch) | |
tree | 9bfc092bf215604dcf7e142ee5bebc5927fc2944 /lisp/time.el | |
parent | 8bff5b1c8bb39d6967982e4dfb7dfc376044ffed (diff) | |
download | emacs-3b67a1bf9ad22468e62450be17b83b9bf54bb1a9.tar.gz |
(display-time-mode): Set the variable display-time-mode.
(display-time-mode): New customize variable to
automatically load the package.
Diffstat (limited to 'lisp/time.el')
-rw-r--r-- | lisp/time.el | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lisp/time.el b/lisp/time.el index ad94c2c4fab..9c405c2a1aa 100644 --- a/lisp/time.el +++ b/lisp/time.el @@ -34,6 +34,17 @@ :group 'mail) +(defcustom display-time-mode nil + "Toggle display of time, load level, and mail flag in mode lines. +You must modify via \\[customize] for this variable to have an effect." + :set (lambda (symbol value) + (display-time-mode (or value 0))) + :initialize 'custom-initialize-default + :type 'boolean + :group 'display-time + :require 'time) + + (defcustom display-time-mail-file nil "*File name of mail inbox file, for indicating existence of new mail. Non-nil and not a string means don't check for mail. nil means use @@ -95,6 +106,7 @@ This runs the normal hook `display-time-hook' after each update." (let ((on (if (null arg) (not display-time-timer) (> (prefix-numeric-value arg) 0)))) + (setq display-time-mode on) (and display-time-timer (cancel-timer display-time-timer)) (setq display-time-timer nil) (setq display-time-string "") @@ -241,6 +253,9 @@ would give mode line times like `94/12/30 21:07:48 (UTC)'." (and (file-exists-p file) (< 0 (nth 7 (file-attributes (file-chase-links file)))))) +(if display-time-mode + (display-time-mode t)) + (provide 'time) ;;; time.el ends here |