From: Glenn Morris Date: Tue, 8 Dec 2015 02:05:35 +0000 (-0500) Subject: * lisp/calendar/cal-html.el: Require diary-lib. X-Git-Tag: emacs-25.0.90~513 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5ec9d8ff4fdc2769d674ebe1f63c019cc6137273;p=emacs.git * lisp/calendar/cal-html.el: Require diary-lib. (cal-html-list-diary-entries): Handle no diary. (Bug#21994) --- 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.