]> git.eshelyaron.com Git - emacs.git/commitdiff
*** empty log message ***
authorGlenn Morris <rgm@gnu.org>
Mon, 23 Feb 2004 00:11:12 +0000 (00:11 +0000)
committerGlenn Morris <rgm@gnu.org>
Mon, 23 Feb 2004 00:11:12 +0000 (00:11 +0000)
lisp/ChangeLog
lisp/calendar/calendar.el

index 902b3072148a4b78d3317c20b65776f1a1589959..51f9e579d4926041362d245a2a8ded8a16ee23f7 100644 (file)
@@ -1,3 +1,15 @@
+2004-02-23  Glenn Morris  <gmorris@ast.cam.ac.uk>
+
+       * calendar/calendar.el (generate-calendar)
+       (calendar-read-date): Prevent display of BC calendars once more -
+       reverts 2003-10-01 change.
+       (generate-calendar-month): Doc fix.
+
+2004-02-03  Matthew Mundell  <matt@mundell.ukfsn.org>  (tiny change)
+
+       * calendar/diary-lib.el (fancy-diary-display): Don't rely on
+       return value of increment-calendar-month.
+
 2004-02-21  Stephen Compall  <s11@member.fsf.org>
 
        * saveplace.el (save-place-forget-unreadable-files)
index a0644f54aa2c1ff2a627d92d4cb3e07475443edb..c1277ca5132add429941e4caf70876288eeb54c0 100644 (file)
@@ -1924,12 +1924,15 @@ Or, for optional MON, YR."
         (run-hooks 'today-invisible-calendar-hook)))))
 
 (defun generate-calendar (month year)
-  "Generate a three-month Gregorian calendar centered around MONTH, YEAR.
-A negative YEAR is interpreted as BC; -1 being 1 BC, and so on.
-Note that while calendars can be displayed for years BC, some functions (eg
-motion, complex holiday functions) will not work correctly for such dates."
-  (setq displayed-month month)
-  (setq displayed-year year)
+  "Generate a three-month Gregorian calendar centered around MONTH, YEAR."
+;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on.
+;;; Note that while calendars for years BC could be displayed as it
+;;; stands, almost all other calendar functions (eg holidays) would 
+;;; at best have unpredictable results for such dates.
+  (if (< (+ month (* 12 (1- year))) 2)
+      (error "Months before February, 1 AD are not available"))
+  (setq displayed-month month
+        displayed-year year)
   (erase-buffer)
   (increment-calendar-month month year -1)
   (calendar-for-loop i from 0 to 2 do
@@ -1941,7 +1944,7 @@ motion, complex holiday functions) will not work correctly for such dates."
 The calendar is inserted at the top of the buffer in which point is currently
 located, but indented INDENT spaces.  The indentation is done from the first
 character on the line and does not disturb the first INDENT characters on the
-line.  A negative YEAR is interpreted as BC; -1 being 1 BC, and so on."
+line."
   (let* ((blank-days;; at start of month
           (mod
            (- (calendar-day-of-week (list month 1 year))
@@ -2538,8 +2541,8 @@ If optional NODAY is t, does not ask for day, but just returns
 \(month nil year); if NODAY is any other non-nil value the value returned is
 \(month year)"
   (let* ((year (calendar-read
-                "Year: "
-                (lambda (x) (not (zerop x)))
+                "Year (>0): "
+                (lambda (x) (> x 0))
                 (int-to-string (extract-calendar-year
                                 (calendar-current-date)))))
          (month-array calendar-month-name-array)