diff options
| author | Andreas Schwab | 1999-02-17 10:32:01 +0000 |
|---|---|---|
| committer | Andreas Schwab | 1999-02-17 10:32:01 +0000 |
| commit | 9aa84f7f92800ac19c0393eaec5f7841323bd853 (patch) | |
| tree | 69aff0f89b57c2507ee01613d9fe165cc35c1916 | |
| parent | 68c67d1f821a97908b5cd1f12246ddc11fa1cdcb (diff) | |
| download | emacs-9aa84f7f92800ac19c0393eaec5f7841323bd853.tar.gz emacs-9aa84f7f92800ac19c0393eaec5f7841323bd853.zip | |
(scroll-calendar-left): Don't set
displayed-month and displayed-year here, let generate-calendar do
it, after range checking.
| -rw-r--r-- | lisp/calendar/cal-move.el | 9 |
1 files changed, 5 insertions, 4 deletions
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." | |||
| 93 | (let ((old-date (calendar-cursor-to-date)) | 93 | (let ((old-date (calendar-cursor-to-date)) |
| 94 | (today (calendar-current-date))) | 94 | (today (calendar-current-date))) |
| 95 | (if (/= arg 0) | 95 | (if (/= arg 0) |
| 96 | (progn | 96 | (let ((month displayed-month) |
| 97 | (increment-calendar-month displayed-month displayed-year arg) | 97 | (year displayed-year)) |
| 98 | (generate-calendar-window displayed-month displayed-year) | 98 | (increment-calendar-month month year arg) |
| 99 | (generate-calendar-window month year) | ||
| 99 | (calendar-cursor-to-visible-date | 100 | (calendar-cursor-to-visible-date |
| 100 | (cond | 101 | (cond |
| 101 | ((calendar-date-is-visible-p old-date) old-date) | 102 | ((calendar-date-is-visible-p old-date) old-date) |
| 102 | ((calendar-date-is-visible-p today) today) | 103 | ((calendar-date-is-visible-p today) today) |
| 103 | (t (list displayed-month 1 displayed-year)))))))) | 104 | (t (list month 1 year)))))))) |
| 104 | 105 | ||
| 105 | (defun scroll-calendar-right (arg) | 106 | (defun scroll-calendar-right (arg) |
| 106 | "Scroll the displayed calendar window right by ARG months. | 107 | "Scroll the displayed calendar window right by ARG months. |