emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101781: Minor appt.el changes.


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101781: Minor appt.el changes.
Date: Sun, 03 Oct 2010 18:19:56 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101781
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sun 2010-10-03 18:19:56 -0700
message:
  Minor appt.el changes.
  * lisp/calendar/appt.el (appt-add): Ensure reminders are enabled.
  (appt-activate): Give status messages.
modified:
  lisp/ChangeLog
  lisp/calendar/appt.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-10-04 01:16:00 +0000
+++ b/lisp/ChangeLog    2010-10-04 01:19:56 +0000
@@ -1,3 +1,8 @@
+2010-10-04  Glenn Morris  <address@hidden>
+
+       * calendar/appt.el (appt-add): Ensure reminders are enabled.
+       (appt-activate): Give status messages.
+
 2010-10-03  Teodor Zlatanov  <address@hidden>
 
        * net/gnutls.el: Improve docs.  Remove starttls and ssl emulation.

=== modified file 'lisp/calendar/appt.el'
--- a/lisp/calendar/appt.el     2010-10-03 01:56:11 +0000
+++ b/lisp/calendar/appt.el     2010-10-04 01:19:56 +0000
@@ -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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]