Commit 9aa84f7f authored by Andreas Schwab's avatar Andreas Schwab

(scroll-calendar-left): Don't set

displayed-month and displayed-year here, let generate-calendar do
it, after range checking.
parent 68c67d1f
......@@ -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)
(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-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.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment