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

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

Re: How to achieve desired automatic scrolling behavior


From: Stefan Monnier
Subject: Re: How to achieve desired automatic scrolling behavior
Date: Thu, 30 May 2013 10:45:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

>> Customize scroll-conservatively to 0
>> Advise line-move:
>> (defadvice line-move (around my-advice-line-move activate)
>> (let ((scroll-conservatively 101))
>> ad-do-it))

> Why does the let bound scroll-conservatively not seem to take effect for
> the around advice?

Because the scroll does not happen during the line-move but after it
(line-move just moves point, and once the command is complete,
a redisplay is triggered to reflect the change on screen, at which
point the redisplay code notices that point is "outside the window"
and triggers a scroll to bring it back into view).


        Stefan




reply via email to

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