[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: prevent scroll-lock-mode from scrolling?

From: Emanuel Berg
Subject: Re: prevent scroll-lock-mode from scrolling?
Date: Fri, 17 Jun 2016 03:25:15 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

lee <address@hidden> writes:

> is there a way to prevent the point from
> moving up or down when scroll-lock-mode is
> enabled and the contents of the buffer have
> been scrolled so far as for the first or the
> last line to reach the top or the bottom of
> the frame, respectively?

I don't know, but try this:

(require 'cl-macs)

;; civilized scrolling - one line at a time
(setq scroll-conservatively 10000)
(setq auto-window-vscroll nil)

;; scroll the current window
(defun scroll-up-1 ()
  (scroll-down 1) )
(defun scroll-down-1 ()
  (scroll-up 1) )

;; automatic scrolling
(defun start-automatic-scroll-down ()
  (let ((win))
    (cl-loop do
             (progn (setq win (window-end))
                    (sleep-for 1) ; put speed here in seconds
                    (redisplay) )
     until (= win (window-end)) )))
;; (start-automatic-scroll-down)
;;                             ^ test here

Civilized scrolling: one line at a time!

I have "scroll-up-1" M-i, ditto down M-k,
and... well, it is all in the file.
Worth checking out!

underground experts united ....
Emacs Gnus Blogomatic .........
                   - so far: 48 Blogomatic articles -                   

reply via email to

[Prev in Thread] Current Thread [Next in Thread]