[Top][All Lists]

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

Re: try_scrolling question

From: Eli Zaretskii
Subject: Re: try_scrolling question
Date: Sat, 04 Dec 2021 10:23:54 +0200

> From: Po Lu <luangruo@yahoo.com>
> Date: Sat, 04 Dec 2021 15:38:49 +0800
>    Value is
>    ^^^^^
>    1  if scrolling succeeded
>    0  if scrolling didn't find point.
>    -1 if new fonts have been loaded so that we must interrupt redisplay,
>    adjust glyph matrices, and try again.
> Does it mean the return value of try_scrolling?

Yes.  "Value is ..." is our style in documenting the return value of a

> If so, I don't understand how 0 (SCROLLING_SUCCESS) is returned if
> it can't find point, and how -1 can be returned at all.

Heh, a classic case of comments not matching the code.  The code never
looks at the literal values though, only at enumeration values, so the
code works correctly.  I've now fixed the enumeration to match the
comment.  Thanks for catching this (very old) blunder.

reply via email to

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