From 5ec9d8ff4fdc2769d674ebe1f63c019cc6137273 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Mon, 7 Dec 2015 21:05:35 -0500 Subject: [PATCH] * lisp/calendar/cal-html.el: Require diary-lib. (cal-html-list-diary-entries): Handle no diary. (Bug#21994) --- lisp/calendar/cal-html.el | 9 +++++---- 1 file 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. -- 2.39.2