From: Glenn Morris Date: Mon, 4 Oct 2010 01:19:56 +0000 (-0700) Subject: Minor appt.el changes. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~46^2~193 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b4593555945cb23a37bde10e9de93e4cdde5cc13;p=emacs.git Minor appt.el changes. * lisp/calendar/appt.el (appt-add): Ensure reminders are enabled. (appt-activate): Give status messages. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index af790a99293..21c50dbc54d 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-04 Glenn Morris + + * calendar/appt.el (appt-add): Ensure reminders are enabled. + (appt-activate): Give status messages. + 2010-10-03 Teodor Zlatanov * net/gnutls.el: Improve docs. Remove starttls and ssl emulation. diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 7667caad336..43e8666bc31 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -446,6 +446,7 @@ sMinutes before the appointment to start warning: ") (and warntime (not (integerp warntime)) (error "Argument WARNTIME must be an integer, or nil")) + (or appt-timer (appt-activate)) (let ((time-msg (list (list (appt-convert-time time)) (concat time " " msg) t))) ;; It is presently non-sensical to have multiple warnings about @@ -618,13 +619,16 @@ ARG is positive, otherwise off." (when appt-timer (cancel-timer appt-timer) (setq appt-timer nil)) - (when appt-active - (diary-check-diary-file) - (add-hook 'write-file-functions 'appt-update-list) - (setq appt-timer (run-at-time t 60 'appt-check) - global-mode-string - (append global-mode-string '(appt-mode-string))) - (appt-check t)))) + (if appt-active + (progn + (diary-check-diary-file) + (add-hook 'write-file-functions 'appt-update-list) + (setq appt-timer (run-at-time t 60 'appt-check) + global-mode-string + (append global-mode-string '(appt-mode-string))) + (appt-check t) + (message "Appointment reminders enabled")) + (message "Appointment reminders disabled")))) (provide 'appt)