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

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

Re: Something like `without-redisplay'?


From: Eli Zaretskii
Subject: Re: Something like `without-redisplay'?
Date: Tue, 01 Sep 2015 20:00:05 +0300

> Date: Tue, 1 Sep 2015 18:47:01 +0200
> From: Alexander Shukaev <haroogan@gmail.com>
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>
> 
> >> > Horizontal scrolling doesn't move point, AFAIR.
> >>
> >> Even if `auto-hscroll-mode' is on (which it is by default)?
> >
> > auto-hscroll-mode does the opposite: it scrolls the display to move
> > point into the view.  It doesn't move point.
> 
> Does it mean that
> 
> (save-excursion
>   (end-of-visual-line)
>   (current-column))
> 
> has potential to cause unintentional viewport movement?

Only if you force redisplay, or change the window width, as part of
the save-excursion form.  Otherwise, by the time redisplay is entered,
point is back where it was, and no hscroll will happen.



reply via email to

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