Commit 97ce2730 authored by Glenn Morris's avatar Glenn Morris
Browse files

* lisp/calendar/appt.el (appt-check): Minor simplification.

parent b2fa3a09
2010-09-28 Glenn Morris <rgm@gnu.org>
* calendar/appt.el (appt-check): Minor simplification.
2010-09-28 Katsumi Yamaoka <yamaoka@jpl.org> 2010-09-28 Katsumi Yamaoka <yamaoka@jpl.org>
   
* mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from
......
...@@ -335,41 +335,25 @@ displayed in a window: ...@@ -335,41 +335,25 @@ displayed in a window:
(null appt-prev-comp-time) ; first check (null appt-prev-comp-time) ; first check
(< cur-comp-time appt-prev-comp-time)) ; new day (< cur-comp-time appt-prev-comp-time)) ; new day
(ignore-errors (ignore-errors
(if appt-display-diary (let ((diary-hook (if (assoc 'appt-make-list diary-hook)
(let ((diary-hook diary-hook
(if (assoc 'appt-make-list diary-hook) (cons 'appt-make-list diary-hook)))
diary-hook d-buff d-buff2)
(cons 'appt-make-list diary-hook)))) (if appt-display-diary
(diary)) (diary)
(let* ((diary-display-function 'appt-make-list) (setq d-buff (find-buffer-visiting diary-file))
(d-buff (find-buffer-visiting diary-file))
(selective
(if d-buff ; diary buffer exists
(with-current-buffer d-buff
diary-selective-display)))
d-buff2)
;; Not displaying the diary, so we can ignore ;; Not displaying the diary, so we can ignore
;; diary-number-of-entries. Since appt.el only ;; diary-number-of-entries. Since appt.el only
;; works on a daily basis, no need for more entries. ;; works on a daily basis, no need for more entries.
;; FIXME why not using diary-list-entries with (diary-list-entries (calendar-current-date) 1 t)
;; non-nil LIST-ONLY? ;; If diary buffer did not exist before this command, kill it.
(diary 1) ;; FIXME does not kill any included diary files.
;; If the diary buffer existed before this command, ;; The real issue is that (diary) should not have
;; restore its display state. Otherwise, kill it. ;; the side effect of visiting all the diary files.
(and (setq d-buff2 (find-buffer-visiting diary-file)) ;; It is not really appt.el's job to clean up this mess...
(if d-buff (and (not d-buff)
(or selective (setq d-buff2 (find-buffer-visiting diary-file))
(with-current-buffer d-buff2 (kill-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)))))))
(setq appt-prev-comp-time cur-comp-time (setq appt-prev-comp-time cur-comp-time
appt-mode-string nil appt-mode-string nil
appt-display-count nil) appt-display-count nil)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment