diff options
author | Glenn Morris <rgm@gnu.org> | 2015-12-07 21:05:35 -0500 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2015-12-07 21:05:35 -0500 |
commit | 5ec9d8ff4fdc2769d674ebe1f63c019cc6137273 (patch) | |
tree | 0702bd23944648fe2b12dbc18b9d27e995630ed9 /lisp/calendar/cal-html.el | |
parent | 251fac2a2616c7bb3664cb2e318cad52829d07fe (diff) | |
download | emacs-5ec9d8ff4fdc2769d674ebe1f63c019cc6137273.tar.gz |
* lisp/calendar/cal-html.el: Require diary-lib.
(cal-html-list-diary-entries): Handle no diary. (Bug#21994)
Diffstat (limited to 'lisp/calendar/cal-html.el')
-rw-r--r-- | lisp/calendar/cal-html.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/calendar/cal-html.el b/lisp/calendar/cal-html.el index 4bddc384895..8c46e3ade74 100644 --- a/lisp/calendar/cal-html.el +++ b/lisp/calendar/cal-html.el @@ -32,6 +32,7 @@ ;;; Code: (require 'calendar) +(require 'diary-lib) (defgroup calendar-html nil @@ -358,12 +359,12 @@ of holidays, rather than diary entries." ;; Monthly calendar ;;------------------------------------------------------------ -(autoload 'diary-list-entries "diary-lib") - (defun cal-html-list-diary-entries (d1 d2) "Generate a list of all diary-entries from absolute date D1 to D2." - (diary-list-entries (calendar-gregorian-from-absolute d1) - (1+ (- d2 d1)) t)) + (if (with-demoted-errors "Not adding diary entries: %S" + (diary-check-diary-file)) + (diary-list-entries (calendar-gregorian-from-absolute d1) + (1+ (- d2 d1)) t))) (defun cal-html-insert-agenda-days (month year diary-list holiday-list) "Insert HTML commands for a range of days in monthly calendars. |