# HG changeset patch # User Miles Bader # Date 974883974 0 # Node ID 939d7e7181b6488af7fdf4cecc770694348dd53f # Parent 8b4e311dbd58922b1971fa26884b4d2e8be6100a (generate-calendar-window): When we don't call `fit-window-to-buffer', make sure the top line is fully visible. diff -r 8b4e311dbd58 -r 939d7e7181b6 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Wed Nov 22 02:01:14 2000 +0000 +++ b/lisp/calendar/calendar.el Wed Nov 22 09:06:14 2000 +0000 @@ -1798,8 +1798,11 @@ (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