comparison lisp/time.el @ 11568:9b2265dc03a6

(display-time-sentinel, display-time-filter): Use force-mode-line-update.
author Karl Heuer <kwzh@gnu.org>
date Tue, 25 Apr 1995 22:24:40 +0000
parents dad32dba58bf
children ad9b385814fc
comparison
equal deleted inserted replaced
11567:bcf841745ef2 11568:9b2265dc03a6
86 86
87 (defun display-time-sentinel (proc reason) 87 (defun display-time-sentinel (proc reason)
88 (or (eq (process-status proc) 'run) 88 (or (eq (process-status proc) 'run)
89 (setq display-time-string "")) 89 (setq display-time-string ""))
90 ;; Force mode-line updates 90 ;; Force mode-line updates
91 (save-excursion (set-buffer (other-buffer))) 91 (force-mode-line-update t)
92 (set-buffer-modified-p (buffer-modified-p))
93 (sit-for 0)) 92 (sit-for 0))
94 93
95 (defvar display-time-string-forms 94 (defvar display-time-string-forms
96 '((if display-time-day-and-date 95 '((if display-time-day-and-date
97 (format "%s %s %s " dayname monthname day) 96 (format "%s %s %s " dayname monthname day)
163 ("Sep" . "9") ("Oct" . "10") ("Nov" . "11") ("Dec" . "12"))))) 162 ("Sep" . "9") ("Oct" . "10") ("Nov" . "11") ("Dec" . "12")))))
164 (dayname (substring time 0 3))) 163 (dayname (substring time 0 3)))
165 (setq display-time-string 164 (setq display-time-string
166 (mapconcat 'eval display-time-string-forms ""))) 165 (mapconcat 'eval display-time-string-forms "")))
167 (run-hooks 'display-time-hook) 166 (run-hooks 'display-time-hook)
168 ;; Force redisplay of all buffers' mode lines to be considered. 167 (force-mode-line-update)
169 (save-excursion (set-buffer (other-buffer)))
170 (set-buffer-modified-p (buffer-modified-p))
171 ;; Do redisplay right now, if no input pending. 168 ;; Do redisplay right now, if no input pending.
172 (sit-for 0)) 169 (sit-for 0))
173 170
174 (defun display-time-file-nonempty-p (file) 171 (defun display-time-file-nonempty-p (file)
175 (and (file-exists-p file) 172 (and (file-exists-p file)