Mercurial > emacs
changeset 110753:d9ff3c5329a6
Minor appt.el changes.
* lisp/calendar/appt.el (appt-add): Ensure reminders are enabled.
(appt-activate): Give status messages.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 03 Oct 2010 18:19:56 -0700 |
parents | a347bc5bfc03 |
children | fa69a70cd62e |
files | lisp/ChangeLog lisp/calendar/appt.el |
diffstat | 2 files changed, 16 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Oct 03 20:16:00 2010 -0500 +++ b/lisp/ChangeLog Sun Oct 03 18:19:56 2010 -0700 @@ -1,3 +1,8 @@ +2010-10-04 Glenn Morris <rgm@gnu.org> + + * calendar/appt.el (appt-add): Ensure reminders are enabled. + (appt-activate): Give status messages. + 2010-10-03 Teodor Zlatanov <tzz@lifelogs.com> * net/gnutls.el: Improve docs. Remove starttls and ssl emulation.
--- a/lisp/calendar/appt.el Sun Oct 03 20:16:00 2010 -0500 +++ b/lisp/calendar/appt.el Sun Oct 03 18:19:56 2010 -0700 @@ -446,6 +446,7 @@ (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 @@ (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)