Mercurial > hg > xemacs-beta
comparison lisp/calendar/appt.el @ 134:34a5b81f86ba r20-2b1
Import from CVS: tag r20-2b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:30:11 +0200 |
parents | 9b50b4588a93 |
children |
comparison
equal
deleted
inserted
replaced
133:b27e67717092 | 134:34a5b81f86ba |
---|---|
155 | 155 |
156 | 156 |
157 (require 'calendar) | 157 (require 'calendar) |
158 (require 'diary-lib) | 158 (require 'diary-lib) |
159 | 159 |
160 (defvar appt-issue-message t | 160 (defcustom appt-issue-message t |
161 "*If T, the diary buffer is checked for appointments. For an | 161 "*If T, the diary buffer is checked for appointments. For an |
162 appointment warning to be made, the time must be the first thing on | 162 appointment warning to be made, the time must be the first thing on |
163 the line.") | 163 the line." |
164 | 164 :type 'boolean |
165 (defvar appt-msg-countdown-list '(20 15 10 5 3 1) | 165 :group 'appt) |
166 | |
167 (defcustom appt-msg-countdown-list '(20 15 10 5 3 1) | |
166 "*A list of the intervals in minutes before the appointment when | 168 "*A list of the intervals in minutes before the appointment when |
167 the warnings will be given. That is, if this were the list '(5 3 1), | 169 the warnings will be given. That is, if this were the list '(5 3 1), |
168 then a notification would be given five minutes, three minutes, and | 170 then a notification would be given five minutes, three minutes, and |
169 one minute before the appointment.") | 171 one minute before the appointment." |
170 | 172 :type '(repeat integer) |
171 (defvar appt-check-time-syntax nil | 173 :group 'appt) |
174 | |
175 (defcustom appt-check-time-syntax nil | |
172 "*Whether all diary entries are intended to beging with time specifications. | 176 "*Whether all diary entries are intended to beging with time specifications. |
173 Appt will beep and issue a warning message when encountering unparsable | 177 Appt will beep and issue a warning message when encountering unparsable |
174 lines.") | 178 lines." |
175 | 179 :type 'boolean |
176 (defvar appt-audible t | 180 :group 'appt) |
181 | |
182 (defcustom appt-audible t | |
177 "*Controls whether appointment announcements should beep. | 183 "*Controls whether appointment announcements should beep. |
178 Appt uses two sound-types for beeps: `appt' and `appt-final'. | 184 Appt uses two sound-types for beeps: `appt' and `appt-final'. |
179 If this is a number, then that many beeps will occur. | 185 If this is a number, then that many beeps will occur. |
180 If this is a cons, the car is how many beeps, and the cdr is the | 186 If this is a cons, the car is how many beeps, and the cdr is the |
181 delay between them (a float, fraction of a second to sleep.) | 187 delay between them (a float, fraction of a second to sleep.) |
182 See also the variable `appt-msg-countdown-list'") | 188 See also the variable `appt-msg-countdown-list'" |
183 | 189 :type 'boolean |
184 (defvar appt-display-mode-line t | 190 :group 'appt) |
185 "*Controls if minutes-to-appointment should be displayed on the mode line.") | 191 |
186 | 192 (defcustom appt-display-mode-line t |
187 (defvar appt-announce-method 'appt-window-announce | 193 "*Controls if minutes-to-appointment should be displayed on the mode line." |
194 :type 'boolean | |
195 :group 'appt) | |
196 | |
197 (defcustom appt-announce-method 'appt-window-announce | |
188 "*The name of the function used to notify the user of an impending | 198 "*The name of the function used to notify the user of an impending |
189 appointment. This is called with two arguments, the number of minutes | 199 appointment. This is called with two arguments, the number of minutes |
190 until the appointment, and the appointment description list. | 200 until the appointment, and the appointment description list. |
191 | 201 |
192 Reasonable values for this variable are 'appt-window-announce, | 202 Reasonable values for this variable are 'appt-window-announce, |
193 'appt-message-announce, or 'appt-persistent-message-announce.") | 203 'appt-message-announce, or 'appt-persistent-message-announce." |
204 :type 'function | |
205 :group 'appt) | |
194 | 206 |
195 | 207 |
196 (defvar appt-time-msg-list nil | 208 (defvar appt-time-msg-list nil |
197 "The list of appointments for today. Use appt-add and appt-delete | 209 "The list of appointments for today. Use appt-add and appt-delete |
198 to add and delete appointments from list. The original list is generated | 210 to add and delete appointments from list. The original list is generated |
245 nil | 257 nil |
246 (message "%s" str)) | 258 (message "%s" str)) |
247 )) | 259 )) |
248 | 260 |
249 | 261 |
250 (defvar appt-display-duration 5 | 262 (defcustom appt-display-duration 5 |
251 "*The number of seconds an appointment message is displayed in its own | 263 "*The number of seconds an appointment message is displayed in its own |
252 window if appt-announce-method is 'appt-window-announce.") | 264 window if appt-announce-method is 'appt-window-announce." |
265 :type 'integer | |
266 :group 'appt) | |
253 | 267 |
254 (defun appt-window-announce (min-to-app appt) | 268 (defun appt-window-announce (min-to-app appt) |
255 "Set appt-announce-method to the name of this function to cause appointment | 269 "Set appt-announce-method to the name of this function to cause appointment |
256 notifications to be given via messages in a pop-up window. The variable | 270 notifications to be given via messages in a pop-up window. The variable |
257 appt-display-duration controls how long this window should be left up." | 271 appt-display-duration controls how long this window should be left up." |
339 | 353 |
340 ;;; To display stuff in the mode line, we use a new variable instead of | 354 ;;; To display stuff in the mode line, we use a new variable instead of |
341 ;;; just adding stuff to the display-time-string -- this causes less | 355 ;;; just adding stuff to the display-time-string -- this causes less |
342 ;;; flicker. | 356 ;;; flicker. |
343 | 357 |
344 (defvar appt-mode-line-string "" | 358 (defcustom appt-mode-line-string "" |
345 "*The string displayed in the mode line by the appointment package.") | 359 "*The string displayed in the mode line by the appointment package." |
360 :type 'string | |
361 :group 'appt) | |
346 | 362 |
347 (defun appt-display-mode-line (min-to-app) | 363 (defun appt-display-mode-line (min-to-app) |
348 "Add an appointment annotation to the mode line." | 364 "Add an appointment annotation to the mode line." |
349 (setq appt-mode-line-string | 365 (setq appt-mode-line-string |
350 (if (and appt-display-mode-line min-to-app) | 366 (if (and appt-display-mode-line min-to-app) |