Mercurial > emacs
changeset 70029:14a3b2b9c00b
(appt-add): Check whether an appointment is already present in
appt-time-msg-list. Simplify code.
author | Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> |
---|---|
date | Sat, 15 Apr 2006 16:35:44 +0000 |
parents | d81780942bb8 |
children | f8318ae45127 |
files | lisp/calendar/appt.el |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/appt.el Sat Apr 15 00:28:08 2006 +0000 +++ b/lisp/calendar/appt.el Sat Apr 15 16:35:44 2006 +0000 @@ -498,11 +498,11 @@ (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 ()