From: Andreas Schwab Date: Wed, 17 Feb 1999 10:32:01 +0000 (+0000) Subject: (scroll-calendar-left): Don't set X-Git-Tag: emacs-20.4~612 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9aa84f7f92800ac19c0393eaec5f7841323bd853;p=emacs.git (scroll-calendar-left): Don't set displayed-month and displayed-year here, let generate-calendar do it, after range checking. --- diff --git a/lisp/calendar/cal-move.el b/lisp/calendar/cal-move.el index 65aa7ae93ee..2bf6a0a4957 100644 --- a/lisp/calendar/cal-move.el +++ b/lisp/calendar/cal-move.el @@ -93,14 +93,15 @@ position of the cursor with respect to the calendar as well as possible." (let ((old-date (calendar-cursor-to-date)) (today (calendar-current-date))) (if (/= arg 0) - (progn - (increment-calendar-month displayed-month displayed-year arg) - (generate-calendar-window displayed-month displayed-year) + (let ((month displayed-month) + (year displayed-year)) + (increment-calendar-month month year arg) + (generate-calendar-window month year) (calendar-cursor-to-visible-date (cond ((calendar-date-is-visible-p old-date) old-date) ((calendar-date-is-visible-p today) today) - (t (list displayed-month 1 displayed-year)))))))) + (t (list month 1 year)))))))) (defun scroll-calendar-right (arg) "Scroll the displayed calendar window right by ARG months.