help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Make scroll-{up, down} move point to {start, end} of newly visible t


From: Emanuel Berg
Subject: Re: Make scroll-{up, down} move point to {start, end} of newly visible text
Date: Wed, 09 Aug 2023 22:59:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii wrote:

>>> We have this only for scrolling with the scroll bar: see
>>> scroll-bar-adjust-thumb-portion. Implementing this for
>>> every possible kind of scrolling would need changes to
>>> C code, I think, since scrolling is actually performed by
>>> the display engine.
>> 
>> If one can get the state of scrolling in a window in Elisp
>> one could solve this in Elisp only since then one could
>> write a new scroll function on top of the old, and what it
>> would do is - based on that information - it would either
>> scroll normally or not call the function at all, if
>> scrolling was determined not to make any sense.
>
> I think your mental model of how scrolling works in Emacs is
> not accurate. [...]

That can be helped,

(defun scroll-up-1 ()
  (interactive)
  (scroll-down 1) )

(defun scroll-down-1 ()
  (interactive)
  (scroll-up 1) )

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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