diff options
| author | Glenn Morris | 2010-09-28 21:00:50 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-09-28 21:00:50 -0700 |
| commit | d0de6cba6f2bc6ed9358a8f56fb25421e0e3471b (patch) | |
| tree | 622bf154606e3c94ba46d01e89902f9af1c4d6d5 /lisp | |
| parent | c2828614add492327092a24cc5ec15ff84b4b8ee (diff) | |
| download | emacs-d0de6cba6f2bc6ed9358a8f56fb25421e0e3471b.tar.gz emacs-d0de6cba6f2bc6ed9358a8f56fb25421e0e3471b.zip | |
Minor diary include improvement.
* lisp/calendar/diary-lib.el (diary-include-other-diary-files):
Trap some recursive includes.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 16 |
2 files changed, 12 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b645e41f5d5..24a359cea77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-09-29 Glenn Morris <rgm@gnu.org> | 1 | 2010-09-29 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * calendar/diary-lib.el (diary-include-other-diary-files): | ||
| 4 | Trap some recursive includes. | ||
| 5 | |||
| 3 | * calendar/appt.el (appt-activate): Check diary file. | 6 | * calendar/appt.el (appt-activate): Check diary file. |
| 4 | 7 | ||
| 5 | 2010-09-29 Katsumi Yamaoka <yamaoka@jpl.org> | 8 | 2010-09-29 Katsumi Yamaoka <yamaoka@jpl.org> |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 219e489a2eb..ae244e0a1b6 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -848,16 +848,18 @@ the variable `diary-include-string'." | |||
| 848 | (diary-list-entries-hook 'diary-include-other-diary-files) | 848 | (diary-list-entries-hook 'diary-include-other-diary-files) |
| 849 | (diary-display-function 'ignore) | 849 | (diary-display-function 'ignore) |
| 850 | (diary-including t) | 850 | (diary-including t) |
| 851 | diary-hook diary-list-include-blanks) | 851 | diary-hook diary-list-include-blanks efile) |
| 852 | (if (file-exists-p diary-file) | 852 | (if (file-exists-p diary-file) |
| 853 | (if (file-readable-p diary-file) | 853 | (if (file-readable-p diary-file) |
| 854 | (unwind-protect | 854 | (unwind-protect |
| 855 | (setq diary-included-files | 855 | (if (member (setq efile (expand-file-name diary-file)) |
| 856 | (append diary-included-files | 856 | diary-included-files) |
| 857 | (list (expand-file-name diary-file))) | 857 | (error "Recursive diary include for %s" diary-file) |
| 858 | diary-entries-list | 858 | (setq diary-included-files |
| 859 | (append diary-entries-list | 859 | (append diary-included-files (list efile)) |
| 860 | (diary-list-entries original-date number))) | 860 | diary-entries-list |
| 861 | (append diary-entries-list | ||
| 862 | (diary-list-entries original-date number)))) | ||
| 861 | (with-current-buffer (find-buffer-visiting diary-file) | 863 | (with-current-buffer (find-buffer-visiting diary-file) |
| 862 | (diary-unhide-everything))) | 864 | (diary-unhide-everything))) |
| 863 | (beep) | 865 | (beep) |