From: Miles Bader Date: Wed, 22 Nov 2000 09:06:14 +0000 (+0000) Subject: (generate-calendar-window): When we don't call `fit-window-to-buffer', X-Git-Tag: emacs-pretest-21.0.92~197 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=317545188ae79477955a2ca2f4e5667ff4332d93;p=emacs.git (generate-calendar-window): When we don't call `fit-window-to-buffer', make sure the top line is fully visible. --- diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 33e3e0a98dd..4ad4d406f4d 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1798,8 +1798,11 @@ Or, for optional MON, YR." (calendar-cursor-to-visible-date (if today-visible today (list displayed-month 1 displayed-year))) (set-buffer-modified-p nil) - (unless (or (one-window-p t) - (/= (frame-width) (window-width))) + (if (or (one-window-p t) (/= (frame-width) (window-width))) + ;; Don't mess with the window size, but ensure that the first + ;; line is fully visible + (set-window-vscroll nil 0) + ;; Adjust the window to exactly fit the displayed calendar (fit-window-to-buffer)) (sit-for 0) (and mark-holidays-in-calendar