Subject: bug#5718: scroll-margin in buffer with small line count.

From: Noam Postavsky <[email-masked]>
Date: Thu, 11 Aug 2016 09:24:59 -0400

On Thu, Aug 11, 2016 at 9:05 AM, Oleksandr Gavenko <[email-masked]> wrote:
> On reporting day I removed:
>
>   (setq-default scroll-margin 4)
>
> from ~/.emacs because in "M-x calendar" UP/DOWN navigation become broken.
>
> Even in Emacs 24.5.1 setting
>
>   (setq scroll-margin 4)
>
> in Calendar buffer hide month names on UP/DOWN moves.

This sounds like Bug #10379 which should be fixed as of 24.1 by
calendar mode resetting scroll-margin locally to 0.

calendar.el:1748:

(define-derived-mode calendar-mode nil "Calendar"
...
  (set (make-local-variable 'scroll-margin) 0) ; bug#10379