comparison lisp/calendar/appt.el @ 92655:e5e96d20ca3e

(appt-disp-window, appt-convert-time): Doc fixes.
author Glenn Morris <rgm@gnu.org>
date Sat, 08 Mar 2008 21:21:37 +0000
parents 71481bc91b5a
children 0a27edb53589
comparison
equal deleted inserted replaced
92654:71481bc91b5a 92655:e5e96d20ca3e
44 ;;; documentation of the function `appt-check' is required. 44 ;;; documentation of the function `appt-check' is required.
45 ;;; Relevant customizable variables are also listed in the 45 ;;; Relevant customizable variables are also listed in the
46 ;;; documentation of that function. 46 ;;; documentation of that function.
47 ;;; 47 ;;;
48 ;;; Today's appointment list is initialized from the diary when this 48 ;;; Today's appointment list is initialized from the diary when this
49 ;;; package is activated. Additionally, the appointments list is 49 ;;; package is activated. Additionally, the appointments list is
50 ;;; recreated automatically at 12:01am for those who do not logout 50 ;;; recreated automatically at 12:01am for those who do not logout
51 ;;; every day or are programming late. It is also updated when the 51 ;;; every day or are programming late. It is also updated when the
52 ;;; `diary-file' is saved. Calling `appt-check' with an argument forces 52 ;;; `diary-file' is saved. Calling `appt-check' with an argument forces
53 ;;; a re-initialization at any time. 53 ;;; a re-initialization at any time.
54 ;;; 54 ;;;
55 ;;; In order to add or delete items from today's list, without 55 ;;; In order to add or delete items from today's list, without
56 ;;; changing the diary file, use `appt-add' and `appt-delete'. 56 ;;; changing the diary file, use `appt-add' and `appt-delete'.
57 ;;; 57 ;;;
408 ;; right now. 408 ;; right now.
409 (if appt-mode-string 409 (if appt-mode-string
410 (sit-for 0))))))))) 410 (sit-for 0)))))))))
411 411
412 (defun appt-disp-window (min-to-app new-time appt-msg) 412 (defun appt-disp-window (min-to-app new-time appt-msg)
413 "Display appointment message APPT-MSG in a separate buffer. 413 "Display appointment due in MIN-TO-APP (a string) minutes.
414 The appointment is due in MIN-TO-APP (a string) minutes. 414 NEW-TIME is a string giving the date. Displays the appointment
415 NEW-TIME is a string giving the date." 415 message APPT-MSG in a separate buffer."
416 ;; Make sure we're not in the minibuffer before splitting the window. 416 ;; Make sure we're not in the minibuffer before splitting the window.
417 ;; FIXME this seems needlessly complicated? 417 ;; FIXME this seems needlessly complicated?
418 (when (minibufferp) 418 (when (minibufferp)
419 (other-window 1) 419 (other-window 1)
420 (and (minibufferp) (display-multi-frame-p) (other-frame 1))) 420 (and (minibufferp) (display-multi-frame-p) (other-frame 1)))
599 APPT-LIST is a list of the same format as `appt-time-msg-list'." 599 APPT-LIST is a list of the same format as `appt-time-msg-list'."
600 (sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2))))) 600 (sort appt-list (lambda (e1 e2) (< (caar e1) (caar e2)))))
601 601
602 602
603 (defun appt-convert-time (time2conv) 603 (defun appt-convert-time (time2conv)
604 "Convert hour:min[am/pm] format to minutes from midnight. 604 "Convert hour:min[am/pm] format TIME2CONV to minutes from midnight.
605 A period (.) can be used instead of a colon (:) to separate the 605 A period (.) can be used instead of a colon (:) to separate the
606 hour and minute parts." 606 hour and minute parts."
607 ;; Formats that should be accepted: 607 ;; Formats that should be accepted:
608 ;; 10:00 10.00 10h00 10h 10am 10:00am 10.00am 608 ;; 10:00 10.00 10h00 10h 10am 10:00am 10.00am
609 (let ((min (if (string-match "[h:.]\\([0-9][0-9]\\)" time2conv) 609 (let ((min (if (string-match "[h:.]\\([0-9][0-9]\\)" time2conv)