diff options
| author | Glenn Morris | 2010-09-27 20:00:09 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-09-27 20:00:09 -0700 |
| commit | 97ce27303d9253c9d4088f76661baab6d9627afc (patch) | |
| tree | b3c735746831085a50f3bfbee3bc79c1bdd186cf | |
| parent | b2fa3a09160c5a86174c9bc9d9be35e8a7d01799 (diff) | |
| download | emacs-97ce27303d9253c9d4088f76661baab6d9627afc.tar.gz emacs-97ce27303d9253c9d4088f76661baab6d9627afc.zip | |
* lisp/calendar/appt.el (appt-check): Minor simplification.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/calendar/appt.el | 48 |
2 files changed, 20 insertions, 32 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54564dccffa..0ffce6e1335 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-09-28 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * calendar/appt.el (appt-check): Minor simplification. | ||
| 4 | |||
| 1 | 2010-09-28 Katsumi Yamaoka <yamaoka@jpl.org> | 5 | 2010-09-28 Katsumi Yamaoka <yamaoka@jpl.org> |
| 2 | 6 | ||
| 3 | * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from | 7 | * mail/sendmail.el (mail-citation-prefix-regexp): Remove "}" from |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 18f7a36012f..d0ad6464510 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -335,41 +335,25 @@ displayed in a window: | |||
| 335 | (null appt-prev-comp-time) ; first check | 335 | (null appt-prev-comp-time) ; first check |
| 336 | (< cur-comp-time appt-prev-comp-time)) ; new day | 336 | (< cur-comp-time appt-prev-comp-time)) ; new day |
| 337 | (ignore-errors | 337 | (ignore-errors |
| 338 | (if appt-display-diary | 338 | (let ((diary-hook (if (assoc 'appt-make-list diary-hook) |
| 339 | (let ((diary-hook | 339 | diary-hook |
| 340 | (if (assoc 'appt-make-list diary-hook) | 340 | (cons 'appt-make-list diary-hook))) |
| 341 | diary-hook | 341 | d-buff d-buff2) |
| 342 | (cons 'appt-make-list diary-hook)))) | 342 | (if appt-display-diary |
| 343 | (diary)) | 343 | (diary) |
| 344 | (let* ((diary-display-function 'appt-make-list) | 344 | (setq d-buff (find-buffer-visiting diary-file)) |
| 345 | (d-buff (find-buffer-visiting diary-file)) | ||
| 346 | (selective | ||
| 347 | (if d-buff ; diary buffer exists | ||
| 348 | (with-current-buffer d-buff | ||
| 349 | diary-selective-display))) | ||
| 350 | d-buff2) | ||
| 351 | ;; Not displaying the diary, so we can ignore | 345 | ;; Not displaying the diary, so we can ignore |
| 352 | ;; diary-number-of-entries. Since appt.el only | 346 | ;; diary-number-of-entries. Since appt.el only |
| 353 | ;; works on a daily basis, no need for more entries. | 347 | ;; works on a daily basis, no need for more entries. |
| 354 | ;; FIXME why not using diary-list-entries with | 348 | (diary-list-entries (calendar-current-date) 1 t) |
| 355 | ;; non-nil LIST-ONLY? | 349 | ;; If diary buffer did not exist before this command, kill it. |
| 356 | (diary 1) | 350 | ;; FIXME does not kill any included diary files. |
| 357 | ;; If the diary buffer existed before this command, | 351 | ;; The real issue is that (diary) should not have |
| 358 | ;; restore its display state. Otherwise, kill it. | 352 | ;; the side effect of visiting all the diary files. |
| 359 | (and (setq d-buff2 (find-buffer-visiting diary-file)) | 353 | ;; It is not really appt.el's job to clean up this mess... |
| 360 | (if d-buff | 354 | (and (not d-buff) |
| 361 | (or selective | 355 | (setq d-buff2 (find-buffer-visiting diary-file)) |
| 362 | (with-current-buffer d-buff2 | 356 | (kill-buffer d-buff2)))))) |
| 363 | (if diary-selective-display | ||
| 364 | ;; diary-show-all-entries displays | ||
| 365 | ;; the diary buffer. | ||
| 366 | (diary-unhide-everything)))) | ||
| 367 | ;; FIXME does not kill any included diary files. | ||
| 368 | ;; The real issue is that (diary) should not | ||
| 369 | ;; have the side effect of visiting all the | ||
| 370 | ;; diary files. It is not really appt.el's job to | ||
| 371 | ;; clean up this mess... | ||
| 372 | (kill-buffer d-buff2))))))) | ||
| 373 | (setq appt-prev-comp-time cur-comp-time | 357 | (setq appt-prev-comp-time cur-comp-time |
| 374 | appt-mode-string nil | 358 | appt-mode-string nil |
| 375 | appt-display-count nil) | 359 | appt-display-count nil) |