]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-html.el
Dired recognize dirs when file size in human units
[gnu-emacs] / lisp / calendar / cal-html.el
index dff370460aff37c833b02baab5cfdb8e4bd5ac83..392e6a8d76a2983193dcfcfe7ed49000712449ca 100644 (file)
@@ -1,6 +1,6 @@
 ;;; cal-html.el --- functions for printing HTML calendars
 
-;; Copyright (C) 2002-201 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
 ;; Author: Anna M. Bigatti <bigatti@dima.unige.it>
 ;; Keywords: calendar
@@ -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.