;ELC   
;;; compiled by roland@churchy.gnu.ai.mit.edu on Wed Aug 10 19:08:29 1994
;;; from file /gd/gnu/emacs/19.0/lisp/appt.el
;;; emacs version 19.25.92.3.
;;; 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))
(defvar appt-issue-message t "\
*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-message-warning-time 12 "\
*Time in minutes before an appointment that the warning begins.")
(defvar appt-audible t "\
*Non-nil means beep to indicate appointment.")
(defvar appt-visible t "\
*Non-nil means display appointment message in echo area.")
(defvar appt-display-mode-line t "\
*Non-nil means display minutes to appointment and time on the mode line.")
(defvar appt-msg-window t "\
*Non-nil means display appointment message in another window.")
(defvar appt-display-duration 10 "\
*The number of seconds an appointment message is displayed.")
(defvar appt-display-diary t "\
*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-time-msg-list nil "\
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.")
(defconst max-time 1439 "\
11:59pm in minutes - number of minutes in a day minus 1.")
(defvar appt-display-interval 3 "\
*Number of minutes to wait between checking the appointment list.")
(defvar appt-buffer-name " *appt-buf*" "\
Name of the appointments buffer.")
(defvar appt-disp-window-function (quote appt-disp-window) "\
Function called to display appointment window.")
(defvar appt-delete-window-function (quote appt-delete-window) "\
Function called to remove appointment window and buffer.")
(defalias 'appt-check #[nil "ÁU„ ÂÃ A@Ä¥\"ÅU…BÆÇ	ŠÊË ÌÍO!ÊË ÏÐO!Ä_\\‰ÁYƒZ XƒZ ƒS ƒS Õ ˆ‚Z ÖÕ ˆ)…@…@@@@‰Z	ƒ‘ Wƒ‘ A‰ƒq @@@‚q Wƒ¯ \\Vƒ¯ TZ	Ý	X…?	ÅY…?ƒí ßà!\"ˆ!Å”Å•O\"	@A@#ˆãäå&\"Ý'#ˆ‚(ƒû éê@A@\"ˆ+ƒìÁ!ˆ-ƒ2ßà!\"ˆ!Å”Å•Oî	ïð°!Šñ qˆ)òó !ˆôÅ!ˆ	ÅU…?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. " " " other-buffer set-buffer-modified-p buffer-modified-p sit-for] 6 "\
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 (quote appt-disp-window) #[(min-to-app new-time appt-msg) "ÀÁ!ˆÂ Ã šƒ& ÄÅ!ƒ ÆÄÅ!!ˆ‚& ƒ& ÈÉÅ!!ˆp\nÂ Ì!qÏ ˆÐ ˆÑ!ˆÒÔÖ°Ø!ˆÚÛ!!ˆÜÝ!ˆÆ!ˆ…g ßÅ!+‡" [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 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 set-buffer-modified-p nil appt-audible beep] 5])
(defalias 'appt-delete-window #[nil "ÀÁ\n!!ˆÃ\n!ˆ\f… ÅÆ!‡" [delete-window get-buffer-window appt-buffer-name kill-buffer appt-audible beep 1] 3 "\
Function called to undisplay appointment messages.
Usually just deletes the appointment buffer."])
(defalias (quote appt-select-lowest-window) #[nil "À Â AAA@Ä Æ…G È 	Â	!AAA@\n\nWƒ0 \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])
(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 "\
Add an appointment for the day at TIME and issue MESSAGE.
The time should be in either 24 hour format or am/pm format." "sTime (hh:mm[am/pm]): \nsMessage: "])
(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 nil tmp-appt-msg-list message ""] 3 "\
Delete an appointment from the list of appointments." nil])
(byte-code "ÀÁÂ\"ˆÀÃÄ\"‡" [defalias appt-make-list #[nil "ÀÁ C\nC\"?…hÀÁ CÃ\nAA@S\n@\nA@\nAA@SÈ_\\	ÊVƒ_ 	Ë_Ì\\Í¥Z	Ë¦ÎUƒ_ Ï¦ÎUƒZ Ð¦ÎUƒ_ 	T		,\fÑ_\fË¥\fÏ¥[\fÐ¥\\\\\\\\)\\!C\"…hŠÓƒÖ‰ƒ¥ À@Á C\"ƒ¥ A‰„‘ ƒÙÁ @@\"ƒÚ@A!ÊÛOÝÞ\"ƒÎ”Î•OÎ•GWƒç Î•à\\ÓO‚ê ÖÝá\"ˆâÎ”Î•O!C‰#CB$å$C\"+‚À )A‰„ª *æ!çè éêO!+çè ìíO!.+ï_.\\0@@@1…g10W…gA‰ƒG@@@1‚G-‡" [calendar-date-compare calendar-current-date original-date calendar-gregorian-from-absolute 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] 10] 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]] 3)
(defalias 'appt-convert-time #[(time2conv) "À‰‰ÄÅ\"ˆÇÀ”È\\À•O!ÄÉ\"ˆÇÀ”À•O!ÄÊ\"ƒ@ \nËWƒ@ ÄÉ\"ˆ\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 "\
Convert hour:min[am/pm] format to minutes from midnight."])
(add-hook (quote display-time-hook) (quote appt-check))
