emacs-devel
[Top][All Lists]
Advanced

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

Re: pixel-point-and-height-at-unseen-line


From: Po Lu
Subject: Re: pixel-point-and-height-at-unseen-line
Date: Sat, 27 Nov 2021 14:57:06 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

> This function has several problems that IMO would be good to clean up:
>
>  . It's unnecessarily restricted to a very special use case: a single
>    screen line above the one where window-start is.  It could be much
>    more useful (and be moved to subr.el or simple.el) if it could at
>    least accept an argument to control on which line or position to
>    report.
>
>  . It changes important state variables without protecting itself from
>    errors and non-local exits, so a C-g at an opportune time will
>    disrupt the buffer/window state.
>
>  . It calls vertical-motion without checking its return value, which
>    could tell you whether it actually moved at all, and where.  (One
>    bonus of checking the return value is that you could perhaps drop
>    the bobp test there.)  vertical-motion can do some surprising
>    things around overlays and display properties, especially ones that
>    include newlines in their strings.
>
> Thanks.

I'll look into that.  I did not write that function, I only modified it
(and moved it) so I could reuse the code there in for precision pixel
scrolling.

Thanks.


reply via email to

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