;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ƒZXƒZƒSƒSÕ ˆ‚ZÖÕ ˆ)…@…@@@@‰Z ƒ‘Wƒ‘A‰ƒq@@@‚qWƒ¯\\Vƒ¯TZ Ý 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…g10W…gA‰ƒ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))