Paul R <
paul.r.ml@
gmail.com> writes:
> Chris> If that's not what you have in mind, I've been using these for
> Chris> some time. They keep the cursor in place and move the text
> Chris> underneath it.
>
> Chris> (defun scroll-down-in-place (n) (interactive "p")
> Chris> (previous-line n) (scroll-down n))
>
> Chris> (defun scroll-up-in-place (n) (interactive "p") (next-line n)
> Chris> (scroll-up n))
>
> To avoid weird behaviour when seeing ends of your buffer, use the code
> below.
>
> (global-set-key [down] (lambda ()
> (interactive)
> (next-line 1)
> (unless (eq (window-end) (point-max))
> (scroll-up 1))))
> (global-set-key [up] (lambda ()
> (interactive)
> (previous-line 1)
> (unless (eq (window-start) (point-min))
> (scroll-down 1))))