diff options
| author | Glenn Morris | 2010-09-14 19:46:00 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-09-14 19:46:00 -0700 |
| commit | 1bf6d0759df7c3c535e1b4ec1e3911d3dbf0590a (patch) | |
| tree | 3c9ebdbab171caa80d1e73534d54e8b68cf0f182 | |
| parent | 87e798a785b47f427afd6ff3794c9f27ad21fcbe (diff) | |
| download | emacs-1bf6d0759df7c3c535e1b4ec1e3911d3dbf0590a.tar.gz emacs-1bf6d0759df7c3c535e1b4ec1e3911d3dbf0590a.zip | |
Minor appt-check fix.
* lisp/calendar/appt.el (appt-check): Rather than showing the diary,
just turn off invisible display, and only if needed.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/calendar/appt.el | 22 |
2 files changed, 19 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c38c5ba6413..6972c9c743f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-09-15 Glenn Morris <rgm@gnu.org> | 1 | 2010-09-15 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * calendar/appt.el (appt-check): Rather than showing the diary, | ||
| 4 | just turn off invisible display, and only if needed. | ||
| 5 | |||
| 3 | * calendar/diary-lib.el (diary-list-entries): Doc fix. (Bug#7019) | 6 | * calendar/diary-lib.el (diary-list-entries): Doc fix. (Bug#7019) |
| 4 | 7 | ||
| 5 | 2010-09-14 Stefan Monnier <monnier@iro.umontreal.ca> | 8 | 2010-09-14 Stefan Monnier <monnier@iro.umontreal.ca> |
diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index c850abc63cc..5767ef543ee 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el | |||
| @@ -345,17 +345,27 @@ displayed in a window: | |||
| 345 | (selective | 345 | (selective |
| 346 | (if d-buff ; diary buffer exists | 346 | (if d-buff ; diary buffer exists |
| 347 | (with-current-buffer d-buff | 347 | (with-current-buffer d-buff |
| 348 | diary-selective-display)))) | 348 | diary-selective-display))) |
| 349 | d-buff2) | ||
| 349 | ;; FIXME why not using diary-list-entries with | 350 | ;; FIXME why not using diary-list-entries with |
| 350 | ;; non-nil LIST-ONLY? | 351 | ;; non-nil LIST-ONLY? |
| 351 | (diary) | 352 | (diary) |
| 352 | ;; If the diary buffer existed before this command, | 353 | ;; If the diary buffer existed before this command, |
| 353 | ;; restore its display state. Otherwise, kill it. | 354 | ;; restore its display state. Otherwise, kill it. |
| 354 | (if d-buff | 355 | (and (setq d-buff2 (find-buffer-visiting diary-file)) |
| 355 | ;; Displays the diary buffer. | 356 | (if d-buff |
| 356 | (or selective (diary-show-all-entries)) | 357 | (or selective |
| 357 | (and (setq d-buff (find-buffer-visiting diary-file)) | 358 | (with-current-buffer d-buff2 |
| 358 | (kill-buffer d-buff))))) | 359 | (if diary-selective-display |
| 360 | ;; diary-show-all-entries displays | ||
| 361 | ;; the diary buffer. | ||
| 362 | (diary-unhide-everything)))) | ||
| 363 | ;; FIXME does not kill any included diary files. | ||
| 364 | ;; The real issue is that (diary) should not | ||
| 365 | ;; have the side effect of visiting all the | ||
| 366 | ;; diary files. It is not really appt.el's job to | ||
| 367 | ;; clean up this mess... | ||
| 368 | (kill-buffer d-buff2))))) | ||
| 359 | (error nil))) | 369 | (error nil))) |
| 360 | (setq appt-prev-comp-time cur-comp-time | 370 | (setq appt-prev-comp-time cur-comp-time |
| 361 | appt-mode-string nil | 371 | appt-mode-string nil |