comparison lisp/time.el @ 132:0cbdae7c532f

*** empty log message ***
author Richard M. Stallman <rms@gnu.org>
date Wed, 05 Dec 1990 18:47:42 +0000
parents b6fb5f9cb739
children 7e4c7ef44243
comparison
equal deleted inserted replaced
131:d4c523560fe8 132:0cbdae7c532f
15 15
16 ;; You should have received a copy of the GNU General Public License 16 ;; You should have received a copy of the GNU General Public License
17 ;; along with GNU Emacs; see the file COPYING. If not, write to 17 ;; along with GNU Emacs; see the file COPYING. If not, write to
18 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 18 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
19 19
20
21 (defvar display-time-mail-file nil
22 "*File name of mail inbox file, for indicating existence of new mail.
23 Default is system-dependent, and is the same as used by Rmail.")
20 24
21 (defvar display-time-process nil) 25 (defvar display-time-process nil)
22 26
23 (defvar display-time-interval 60 27 (defvar display-time-interval 60
24 "*Seconds between updates of time in the mode line.") 28 "*Seconds between updates of time in the mode line.")
63 (sit-for 0)) 67 (sit-for 0))
64 68
65 (defun display-time-filter (proc string) 69 (defun display-time-filter (proc string)
66 (let ((time (current-time-string)) 70 (let ((time (current-time-string))
67 (load (format "%03d" (car (load-average)))) 71 (load (format "%03d" (car (load-average))))
68 (mail-spool-file (concat rmail-spool-directory 72 (mail-spool-file (or display-time-mail-file
69 (or (getenv "LOGNAME") 73 (getenv "MAIL")
70 (getenv "USER") 74 (concat rmail-spool-directory
71 (user-login-name)))) 75 (or (getenv "LOGNAME")
76 (getenv "USER")
77 (user-login-name)))))
72 hour pm) 78 hour pm)
73 (setq hour (read (substring time 11 13))) 79 (setq hour (read (substring time 11 13)))
74 (setq pm (>= hour 12)) 80 (setq pm (>= hour 12))
75 (if (> hour 12) 81 (if (> hour 12)
76 (setq hour (- hour 12)) 82 (setq hour (- hour 12))