aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-15 02:59:34 +0000
committerGlenn Morris2008-03-15 02:59:34 +0000
commit354716682dcc2d270c8e09693506673d268de26c (patch)
tree38cbdaaed421834efab25974839d6fe772c1f717
parent706531d9fa9eaf35e7188c1718f338e14cf5c340 (diff)
downloademacs-354716682dcc2d270c8e09693506673d268de26c.tar.gz
emacs-354716682dcc2d270c8e09693506673d268de26c.zip
(appt-check, appt-delete, appt-make-list): Use caar.
-rw-r--r--lisp/calendar/appt.el16
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el
index ece9976e411..5d1a951b9b0 100644
--- a/lisp/calendar/appt.el
+++ b/lisp/calendar/appt.el
@@ -78,8 +78,6 @@
78;; Make sure calendar is loaded when we compile this. 78;; Make sure calendar is loaded when we compile this.
79(require 'calendar) 79(require 'calendar)
80 80
81(defvar diary-selective-display)
82
83 81
84(defgroup appt nil 82(defgroup appt nil
85 "Appointment notification." 83 "Appointment notification."
@@ -248,6 +246,8 @@ The variable `appt-audible' controls the audible reminder."
248 (if appt-audible (beep 1)))) 246 (if appt-audible (beep 1))))
249 247
250 248
249(defvar diary-selective-display)
250
251(defun appt-check (&optional force) 251(defun appt-check (&optional force)
252 "Check for an appointment and update any reminder display. 252 "Check for an appointment and update any reminder display.
253If optional argument FORCE is non-nil, reparse the diary file for 253If optional argument FORCE is non-nil, reparse the diary file for
@@ -358,7 +358,7 @@ displayed in a window:
358 ;; message issued, get the first time off of the list and 358 ;; message issued, get the first time off of the list and
359 ;; calculate the number of minutes until the appointment. 359 ;; calculate the number of minutes until the appointment.
360 (if (and appt-issue-message appt-time-msg-list) 360 (if (and appt-issue-message appt-time-msg-list)
361 (let ((appt-comp-time (car (car (car appt-time-msg-list))))) 361 (let ((appt-comp-time (caar (car appt-time-msg-list))))
362 (setq min-to-app (- appt-comp-time cur-comp-time)) 362 (setq min-to-app (- appt-comp-time cur-comp-time))
363 363
364 (while (and appt-time-msg-list 364 (while (and appt-time-msg-list
@@ -366,7 +366,7 @@ displayed in a window:
366 (setq appt-time-msg-list (cdr appt-time-msg-list)) 366 (setq appt-time-msg-list (cdr appt-time-msg-list))
367 (if appt-time-msg-list 367 (if appt-time-msg-list
368 (setq appt-comp-time 368 (setq appt-comp-time
369 (car (car (car appt-time-msg-list)))))) 369 (caar (car appt-time-msg-list)))))
370 ;; If we have an appointment between midnight and 370 ;; If we have an appointment between midnight and
371 ;; `appt-message-warning-time' minutes after midnight, 371 ;; `appt-message-warning-time' minutes after midnight,
372 ;; we must begin to issue a message before midnight. 372 ;; we must begin to issue a message before midnight.
@@ -494,7 +494,7 @@ The time should be in either 24 hour format or am/pm format."
494 ;; doublequotes around it. 494 ;; doublequotes around it.
495 (prin1-to-string 495 (prin1-to-string
496 (substring-no-properties 496 (substring-no-properties
497 (car (cdr element)) 0)) 497 (cadr element) 0))
498 " from list? ")) 498 " from list? "))
499 (test-input (y-or-n-p prompt-string))) 499 (test-input (y-or-n-p prompt-string)))
500 (setq tmp-msg-list (cdr tmp-msg-list)) 500 (setq tmp-msg-list (cdr tmp-msg-list))
@@ -556,7 +556,7 @@ appointment package (if it is not already active)."
556 ;; Parse the entries for today. 556 ;; Parse the entries for today.
557 (while (and entry-list 557 (while (and entry-list
558 (calendar-date-equal 558 (calendar-date-equal
559 (calendar-current-date) (car (car entry-list)))) 559 (calendar-current-date) (caar entry-list)))
560 (let ((time-string (cadr (car entry-list)))) 560 (let ((time-string (cadr (car entry-list))))
561 (while (string-match appt-time-regexp time-string) 561 (while (string-match appt-time-regexp time-string)
562 (let* ((beg (match-beginning 0)) 562 (let* ((beg (match-beginning 0))
@@ -589,12 +589,12 @@ appointment package (if it is not already active)."
589 (cur-hour (nth 2 now)) 589 (cur-hour (nth 2 now))
590 (cur-min (nth 1 now)) 590 (cur-min (nth 1 now))
591 (cur-comp-time (+ (* cur-hour 60) cur-min)) 591 (cur-comp-time (+ (* cur-hour 60) cur-min))
592 (appt-comp-time (car (caar appt-time-msg-list)))) 592 (appt-comp-time (caar (car appt-time-msg-list))))
593 593
594 (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) 594 (while (and appt-time-msg-list (< appt-comp-time cur-comp-time))
595 (setq appt-time-msg-list (cdr appt-time-msg-list)) 595 (setq appt-time-msg-list (cdr appt-time-msg-list))
596 (if appt-time-msg-list 596 (if appt-time-msg-list
597 (setq appt-comp-time (car (caar appt-time-msg-list)))))))))) 597 (setq appt-comp-time (caar (car appt-time-msg-list))))))))))
598 598
599 599
600(defun appt-sort-list (appt-list) 600(defun appt-sort-list (appt-list)