Emacs, scroll page without moving point

I’ve been trying to find a way to move up and down a page, without actually moving the point. It’s good if you want to take a look around the file.

Just found this cool snippet on:


that seams to do the trick, but I mapped to different keys M + p and M + n, and also changed the speed of the scroll to 4.

(defun gcm-scroll-down ()
      (scroll-up 4))
(defun gcm-scroll-up ()
      (scroll-down 4))
(global-set-key (kbd "M-p") 'gcm-scroll-up)
(global-set-key (kbd "M-n") 'gcm-scroll-down)
Share Comments
comments powered by Disqus