Mercurial > emacs
comparison lisp/calendar/appt.el @ 92816:0a27edb53589
(appt-mode-string): Mark as risky.
(appt-check): Apply mode-line-emphasis face to appt-mode-string.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 13 Mar 2008 03:48:35 +0000 |
parents | e5e96d20ca3e |
children | e2f0046a8cb4 |
comparison
equal
deleted
inserted
replaced
92815:8f33820cee18 | 92816:0a27edb53589 |
---|---|
201 | 201 |
202 (defvar appt-mode-string nil | 202 (defvar appt-mode-string nil |
203 "String being displayed in the mode line saying you have an appointment. | 203 "String being displayed in the mode line saying you have an appointment. |
204 The actual string includes the amount of time till the appointment. | 204 The actual string includes the amount of time till the appointment. |
205 Only used if `appt-display-mode-line' is non-nil.") | 205 Only used if `appt-display-mode-line' is non-nil.") |
206 (put 'appt-mode-string 'risky-local-variable t) ; for 'face property | |
206 | 207 |
207 (defvar appt-prev-comp-time nil | 208 (defvar appt-prev-comp-time nil |
208 "Time of day (mins since midnight) at which we last checked appointments. | 209 "Time of day (mins since midnight) at which we last checked appointments. |
209 A nil value forces the diary file to be (re-)checked for appointments.") | 210 A nil value forces the diary file to be (re-)checked for appointments.") |
210 | 211 |
388 (unless mode-line-only | 389 (unless mode-line-only |
389 (appt-display-message (cadr (car appt-time-msg-list)) | 390 (appt-display-message (cadr (car appt-time-msg-list)) |
390 min-to-app)) | 391 min-to-app)) |
391 (when appt-display-mode-line | 392 (when appt-display-mode-line |
392 (setq appt-mode-string | 393 (setq appt-mode-string |
393 (format " App't in %s min." min-to-app))) | 394 (concat " " (propertize |
395 (format "App't in %s min." min-to-app) | |
396 'face 'mode-line-emphasis)))) | |
394 ;; When an appointment is reached, delete it from | 397 ;; When an appointment is reached, delete it from |
395 ;; the list. Reset the count to 0 in case we | 398 ;; the list. Reset the count to 0 in case we |
396 ;; display another appointment on the next cycle. | 399 ;; display another appointment on the next cycle. |
397 (if (zerop min-to-app) | 400 (if (zerop min-to-app) |
398 (setq appt-time-msg-list (cdr appt-time-msg-list) | 401 (setq appt-time-msg-list (cdr appt-time-msg-list) |