emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r101660: * lisp/calendar/appt.el (app


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101660: * lisp/calendar/appt.el (appt-check): Minor simplification.
Date: Mon, 27 Sep 2010 20:00:09 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101660
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2010-09-27 20:00:09 -0700
message:
  * lisp/calendar/appt.el (appt-check): Minor simplification.
modified:
  lisp/ChangeLog
  lisp/calendar/appt.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-09-28 02:13:41 +0000
+++ b/lisp/ChangeLog    2010-09-28 03:00:09 +0000
@@ -1,3 +1,7 @@
+2010-09-28  Glenn Morris  <address@hidden>
+
+       * calendar/appt.el (appt-check): Minor simplification.
+
 2010-09-28  Katsumi Yamaoka  <address@hidden>
 
        * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from

=== modified file 'lisp/calendar/appt.el'
--- a/lisp/calendar/appt.el     2010-09-23 19:00:31 +0000
+++ b/lisp/calendar/appt.el     2010-09-28 03:00:09 +0000
@@ -335,41 +335,25 @@
                 (null appt-prev-comp-time) ; first check
                 (< cur-comp-time appt-prev-comp-time)) ; new day
             (ignore-errors
-              (if appt-display-diary
-                  (let ((diary-hook
-                         (if (assoc 'appt-make-list diary-hook)
-                             diary-hook
-                           (cons 'appt-make-list diary-hook))))
-                    (diary))
-                (let* ((diary-display-function 'appt-make-list)
-                       (d-buff (find-buffer-visiting diary-file))
-                       (selective
-                        (if d-buff    ; diary buffer exists
-                            (with-current-buffer d-buff
-                              diary-selective-display)))
-                       d-buff2)
+              (let ((diary-hook (if (assoc 'appt-make-list diary-hook)
+                                    diary-hook
+                                  (cons 'appt-make-list diary-hook)))
+                    d-buff d-buff2)
+                (if appt-display-diary
+                    (diary)
+                  (setq d-buff (find-buffer-visiting diary-file))
                   ;; Not displaying the diary, so we can ignore
                   ;; diary-number-of-entries.  Since appt.el only
                   ;; works on a daily basis, no need for more entries.
-                  ;; FIXME why not using diary-list-entries with
-                  ;; non-nil LIST-ONLY?
-                  (diary 1)
-                  ;; If the diary buffer existed before this command,
-                  ;; restore its display state.  Otherwise, kill it.
-                  (and (setq d-buff2 (find-buffer-visiting diary-file))
-                       (if d-buff
-                           (or selective
-                               (with-current-buffer d-buff2
-                                 (if diary-selective-display
-                                     ;; diary-show-all-entries displays
-                                     ;; the diary buffer.
-                                     (diary-unhide-everything))))
-                         ;; FIXME does not kill any included diary files.
-                         ;; The real issue is that (diary) should not
-                         ;; have the side effect of visiting all the
-                         ;; diary files.  It is not really appt.el's job to
-                         ;; clean up this mess...
-                         (kill-buffer d-buff2)))))))
+                  (diary-list-entries (calendar-current-date) 1 t)
+                  ;; If diary buffer did not exist before this command, kill 
it.
+                  ;; FIXME does not kill any included diary files.
+                  ;; The real issue is that (diary) should not have
+                  ;; the side effect of visiting all the diary files.
+                  ;; It is not really appt.el's job to clean up this mess...
+                  (and (not d-buff)
+                       (setq d-buff2 (find-buffer-visiting diary-file))
+                       (kill-buffer d-buff2))))))
         (setq appt-prev-comp-time cur-comp-time
               appt-mode-string nil
               appt-display-count nil)


reply via email to

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