]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/appt.el
(calendar-mode-map): Refer to diary-show-all-entries rather than alias
[gnu-emacs] / lisp / calendar / appt.el
index 40c6bfc2c861cfced5fc5a299fccb731e96ec520..36934783b9395f5c75fbfcf01eabfb8150d5c5b0 100644 (file)
@@ -1,7 +1,7 @@
 ;;; appt.el --- appointment notification functions
 
-;; Copyright (C) 1989, 1990, 1994, 1998, 2001, 2002, 2003, 2004, 2005
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1989, 1990, 1994, 1998, 2001, 2002, 2003, 2004, 2005,
+;;   2006  Free Software Foundation, Inc.
 
 ;; Author: Neil Mager <neilm@juliet.ll.mit.edu>
 ;; Maintainer: Glenn Morris <rgm@gnu.org>
@@ -78,6 +78,7 @@
 ;; Make sure calendar is loaded when we compile this.
 (require 'calendar)
 
+(defvar diary-selective-display)
 
 ;;;###autoload
 (defcustom appt-issue-message t
@@ -497,11 +498,11 @@ The time should be in either 24 hour format or am/pm format."
   (interactive "sTime (hh:mm[am/pm]): \nsMessage: ")
   (unless (string-match appt-time-regexp new-appt-time)
     (error "Unacceptable time-string"))
-  (let* ((appt-time-string (concat new-appt-time " " new-appt-msg))
-         (appt-time (list (appt-convert-time new-appt-time)))
-         (time-msg (list appt-time appt-time-string t)))
-    (setq appt-time-msg-list (nconc appt-time-msg-list (list time-msg)))
-    (setq appt-time-msg-list (appt-sort-list appt-time-msg-list))))
+  (let ((time-msg (list (list (appt-convert-time new-appt-time))
+                        (concat new-appt-time " " new-appt-msg) t)))
+    (unless (member time-msg appt-time-msg-list)
+      (setq appt-time-msg-list
+            (appt-sort-list (nconc appt-time-msg-list (list time-msg)))))))
 
 ;;;###autoload
 (defun appt-delete ()