;ELC   
;;; compiled by kwzh@hal.gnu.ai.mit.edu on Tue May  2 20:12:53 1995
;;; from file /gd/gnu/emacs/19.0/lisp/appt.el
;;; emacs version 19.28.90.69.
;;; bytecomp version FSF 2.10
;;; optimization is on.
;;; this file uses opcodes which do not exist in Emacs 18.

(if (and (boundp 'emacs-version)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19")))
    (error "`/gd/gnu/emacs/19.0/lisp/appt.el' was compiled for Emacs 19"))


(require (quote calendar))
#@141 *Non-nil means check for appointments in the diary buffer.
To be detected, the diary entry must have the time
as the first thing on a line.
(defvar appt-issue-message t (#$ . -505))
#@65 *Time in minutes before an appointment that the warning begins.
(defvar appt-message-warning-time 12 (#$ . -693))
#@46 *Non-nil means beep to indicate appointment.
(defvar appt-audible t (#$ . -813))
#@58 *Non-nil means display appointment message in echo area.
(defvar appt-visible t (#$ . -900))
#@74 *Non-nil means display minutes to appointment and time on the mode line.
(defvar appt-display-mode-line t (#$ . -999))
#@63 *Non-nil means display appointment message in another window.
(defvar appt-msg-window t (#$ . -1124))
#@61 *The number of seconds an appointment message is displayed.
(defvar appt-display-duration 10 (#$ . -1232))
#@129 *Non-nil means to display the next days diary on the screen. 
This will occur at midnight when the appointment list is updated.
(defvar appt-display-diary t (#$ . -1346))
#@256 The list of appointments for today.
Use `appt-add' and `appt-delete' to add and delete appointments from list.
The original list is generated from the today's `diary-entries-list'.
The number before each time/message is the time in minutes from midnight.
(defvar appt-time-msg-list nil (#$ . 1524))
#@58 11:59pm in minutes - number of minutes in a day minus 1.
(defconst max-time 1439 (#$ . 1829))
#@67 *Number of minutes to wait between checking the appointment list.
(defvar appt-display-interval 3 (#$ . -1929))
#@34 Name of the appointments buffer.
(defvar appt-buffer-name " *appt-buf*" (#$ . 2047))
#@48 Function called to display appointment window.
(defvar appt-disp-window-function (quote appt-disp-window) (#$ . 2138))
#@58 Function called to remove appointment window and buffer.
(defvar appt-delete-window-function (quote appt-delete-window) (#$ . 2263))
#@1671 Check for an appointment and update the mode line.
Note: the time must be the first thing in the line in the diary
for a warning to be issued.

The format of the time can be either 24 hour or am/pm.
Example: 

               02/23/89
                 18:00 Dinner
            
              Thursday
                11:45am Lunch meeting.

The following variables control the action of the notification:

appt-issue-message
	If T, the diary buffer is checked for appointments.

appt-message-warning-time
	Variable used to determine if appointment message
	should be displayed.

appt-audible
	Variable used to determine if appointment is audible.
	Default is t.

appt-visible
	Variable used to determine if appointment message should be
	displayed in the mini-buffer. Default is t.

appt-msg-window
	Variable used to determine if appointment message
	should temporarily appear in another window. Mutually exclusive
	to appt-visible.

appt-display-duration
	The number of seconds an appointment message
	is displayed in another window.

appt-display-interval
	The number of minutes to wait between checking the appointments
	list.

appt-disp-window-function 
    	Function called to display appointment window. You can customize
	appt.el by setting this variable to a function different from the
	one provided with this package.
  
appt-delete-window-function 
    	Function called to remove appointment window and buffer.  You can
	customize appt.el by setting this variable to a function different
	from the one provided with this package.

This function is run from the loadst process for display time.
Therefore, you need to have `(display-time)' in your .emacs file.
(defalias 'appt-check #[nil "U  A@ĥ\"U;	 O! O!_\\YZ XZ S S  Z  )99@@@Z	 W Aq @@@q W \\V TZ		X8	Y8 !\"!ŔŕO\"	@A@#&\"'#( @A@\"+!-+!\"!ŔŕO	!!!	U8A)." [appt-display-interval 1 mod current-time 60 0 -1 "" new-time min-to-app string-to-int current-time-string 11 13 cur-hour 14 16 cur-min cur-comp-time view-diary-entries-initially appt-display-diary diary appt-make-list diary-display-hook appt-issue-message appt-time-msg-list appt-comp-time appt-message-warning-time max-time nil appt-msg-window string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" display-time-string appt-disp-window-function run-at-time format "%d sec" appt-display-duration appt-delete-window-function appt-visible message "%s" appt-audible beep appt-display-mode-line "App't in " " min. " " " force-mode-line-update t sit-for] 6 (#$ . 2404)])
(defalias 'appt-disp-window #[(min-to-app new-time appt-msg) "!  & ! !!& & !!p\n !q  AG !O  !ٰ!\"!!!\"x !+" [require electric selected-window minibuffer-window other-window 1 select-window window-system select-frame other-frame this-buffer this-window get-buffer-create appt-buffer-name appt-disp-buf appt-select-lowest-window unsplittable frame-parameters display-buffer split-window pop-to-buffer "-------------------- Appointment in " min-to-app " minutes. " new-time " %-" mode-line-format insert-string appt-msg shrink-window-if-larger-than-buffer get-buffer-window t set-buffer-modified-p nil appt-audible beep] 5])
#@97 Function called to undisplay appointment messages.
Usually just deletes the appointment buffer.
(defalias 'appt-delete-window #[nil "	\" ! !!= !)	!	* !" [get-buffer-window appt-buffer-name t window fboundp frame-root-window window-frame delete-window kill-buffer appt-audible beep 1] 5 (#$ . 5802)])
(defalias 'appt-select-lowest-window #[nil "  AAA@ G  		!AAA@\n\nW0 \n		!	=C 	!* ," [selected-window lowest-window window-edges bottom-edge previous-window last-window t window-search next-window this-window next-bottom-edge select-window nil] 2])
#@120 Add an appointment for the day at TIME and issue MESSAGE.
The time should be in either 24 hour format or am/pm format.
(defalias 'appt-add #[(new-appt-time new-appt-msg) "\n\" !\nQ\n!C	CB\n\f\nC\"\f\f!\f+" [string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time error "Unacceptable time-string" " " new-appt-msg appt-time-string appt-convert-time appt-time time-msg append appt-time-msg-list appt-sort-list] 4 (#$ . 6421) "sTime (hh:mm[am/pm]): \nsMessage: "])
#@54 Delete an appointment from the list of appointments.
(defalias 'appt-delete #[nil "	* 	@\nA@!Q!	A& \n\"+ !)" [appt-time-msg-list tmp-msg-list element "Delete " prin1-to-string " from list? " prompt-string y-or-n-p test-input delq message ""] 3 (#$ . 6926) nil])
(defalias 'appt-make-list #[nil " C\nC\"? C\nAA@)S\f@)\fA@)\fAA@)S_\\\nVx \n_\\ΥZ\n̦Uo ЦU?o ѦU)x \nT\n\n-_̥Х[ѥ\\\\\\\\*\\!C\"8 @ C\" A 7 @@\"7@A!O\"-ϔϕO ϕGW ϕ\\O\"ϔϕO!C$ CB%%C\"+ )A *! O!, O!/,_/\\1@@@221WA`@@@2`-" [calendar-date-compare calendar-current-date original-date calendar-gregorian-from-absolute date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 number nil appt-time-msg-list diary-entries-list "" new-time-string entry-list calendar-date-equal prin1-to-string -2 time-string string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?.*" appt-time-string 1 "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" appt-convert-time appt-time time-msg append appt-sort-list string-to-int current-time-string 11 13 cur-hour 14 16 cur-min 60 cur-comp-time appt-comp-time] 11])
(defalias 'appt-sort-list #[(appt-list) "\n: \n@@@\nA+ \f@@@W$ @@@A 	C\"\n\"+ 	)" [nil order-list appt-list element element-time tmp-list append delq] 4])
#@58 Convert hour:min[am/pm] format to minutes from midnight.
(defalias 'appt-convert-time #[(time2conv) "\"\\O!\"O!\"@ \nW@ \"\n\\\n_	\\+" [0 min hr conv-time string-match ":[0-9][0-9]" time2conv string-to-int 1 "[0-9]?[0-9]:" "[p][m]" 12 60] 5 (#$ . 8417)])
(add-hook (quote display-time-hook) (quote appt-check))
