]> 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 9e9544d707b90541039ffb6c388b9f546dce88e1..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
@@ -68,7 +69,7 @@
 
 (defcustom cal-html-holidays t
   "If non-nil, include holidays as well as diary entries."
-  :version "24.2"
+  :version "24.3"
   :type 'boolean
   :group 'calendar-html)
 
@@ -92,7 +93,7 @@
    "</STYLE>\n\n")
   "Default cal-html css style.  You can override this with a \"cal.css\" file."
   :type 'string
-  :version "24.2"                       ; added SPAN.HOLIDAY
+  :version "24.3"                       ; added SPAN.HOLIDAY
   :group 'calendar-html)
 
 ;;; End customizable variables.
@@ -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.