aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2004-02-23 00:11:12 +0000
committerGlenn Morris2004-02-23 00:11:12 +0000
commit4c635ea3532cf2145b847610dd3c6c252be77d0f (patch)
tree6e0e88e8e9377a8f5da63594b76a30fe4038395e
parentde3fce917a4d536639b9bf24b66303fe4ad6c524 (diff)
downloademacs-4c635ea3532cf2145b847610dd3c6c252be77d0f.tar.gz
emacs-4c635ea3532cf2145b847610dd3c6c252be77d0f.zip
*** empty log message ***
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/calendar/calendar.el21
2 files changed, 24 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 902b3072148..51f9e579d49 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,15 @@
12004-02-23 Glenn Morris <gmorris@ast.cam.ac.uk>
2
3 * calendar/calendar.el (generate-calendar)
4 (calendar-read-date): Prevent display of BC calendars once more -
5 reverts 2003-10-01 change.
6 (generate-calendar-month): Doc fix.
7
82004-02-03 Matthew Mundell <matt@mundell.ukfsn.org> (tiny change)
9
10 * calendar/diary-lib.el (fancy-diary-display): Don't rely on
11 return value of increment-calendar-month.
12
12004-02-21 Stephen Compall <s11@member.fsf.org> 132004-02-21 Stephen Compall <s11@member.fsf.org>
2 14
3 * saveplace.el (save-place-forget-unreadable-files) 15 * saveplace.el (save-place-forget-unreadable-files)
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index a0644f54aa2..c1277ca5132 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1924,12 +1924,15 @@ Or, for optional MON, YR."
1924 (run-hooks 'today-invisible-calendar-hook))))) 1924 (run-hooks 'today-invisible-calendar-hook)))))
1925 1925
1926(defun generate-calendar (month year) 1926(defun generate-calendar (month year)
1927 "Generate a three-month Gregorian calendar centered around MONTH, YEAR. 1927 "Generate a three-month Gregorian calendar centered around MONTH, YEAR."
1928A negative YEAR is interpreted as BC; -1 being 1 BC, and so on. 1928;;; A negative YEAR is interpreted as BC; -1 being 1 BC, and so on.
1929Note that while calendars can be displayed for years BC, some functions (eg 1929;;; Note that while calendars for years BC could be displayed as it
1930motion, complex holiday functions) will not work correctly for such dates." 1930;;; stands, almost all other calendar functions (eg holidays) would
1931 (setq displayed-month month) 1931;;; at best have unpredictable results for such dates.
1932 (setq displayed-year year) 1932 (if (< (+ month (* 12 (1- year))) 2)
1933 (error "Months before February, 1 AD are not available"))
1934 (setq displayed-month month
1935 displayed-year year)
1933 (erase-buffer) 1936 (erase-buffer)
1934 (increment-calendar-month month year -1) 1937 (increment-calendar-month month year -1)
1935 (calendar-for-loop i from 0 to 2 do 1938 (calendar-for-loop i from 0 to 2 do
@@ -1941,7 +1944,7 @@ motion, complex holiday functions) will not work correctly for such dates."
1941The calendar is inserted at the top of the buffer in which point is currently 1944The calendar is inserted at the top of the buffer in which point is currently
1942located, but indented INDENT spaces. The indentation is done from the first 1945located, but indented INDENT spaces. The indentation is done from the first
1943character on the line and does not disturb the first INDENT characters on the 1946character on the line and does not disturb the first INDENT characters on the
1944line. A negative YEAR is interpreted as BC; -1 being 1 BC, and so on." 1947line."
1945 (let* ((blank-days;; at start of month 1948 (let* ((blank-days;; at start of month
1946 (mod 1949 (mod
1947 (- (calendar-day-of-week (list month 1 year)) 1950 (- (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
2538\(month nil year); if NODAY is any other non-nil value the value returned is 2541\(month nil year); if NODAY is any other non-nil value the value returned is
2539\(month year)" 2542\(month year)"
2540 (let* ((year (calendar-read 2543 (let* ((year (calendar-read
2541 "Year: " 2544 "Year (>0): "
2542 (lambda (x) (not (zerop x))) 2545 (lambda (x) (> x 0))
2543 (int-to-string (extract-calendar-year 2546 (int-to-string (extract-calendar-year
2544 (calendar-current-date))))) 2547 (calendar-current-date)))))
2545 (month-array calendar-month-name-array) 2548 (month-array calendar-month-name-array)