]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/calendar/cal-html.el: Require diary-lib.
authorGlenn Morris <rgm@gnu.org>
Tue, 8 Dec 2015 02:05:35 +0000 (21:05 -0500)
committerGlenn Morris <rgm@gnu.org>
Tue, 8 Dec 2015 02:05:35 +0000 (21:05 -0500)
(cal-html-list-diary-entries): Handle no diary.  (Bug#21994)

lisp/calendar/cal-html.el

index 4bddc384895e96e9686334f78fe736894b09e720..8c46e3ade74e2af95c5ff3ea7f7ccd788cbad121 100644 (file)
@@ -32,6 +32,7 @@
 ;;; Code:
 
 (require 'calendar)
+(require 'diary-lib)
 
 \f
 (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.