Subject: bug#57266: Maintaining the base_line_number cache

From: Lars Ingebrigtsen <[email-masked]>
Date: Tue, 23 Aug 2022 16:21:55 +0200

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <[email-masked]> writes:

> Indeed, my proposed patch is not a bug fix.
> It's a code-maintenance patch.  It's meant to improve the code, not
> the behavior.

My two cents: I was reading through parts of the newline (cache) code
last week while I was pondering whether to do the `pos-eol' functions or
not, and I have to say that I found it pretty impregnable.  So in a way
I'm relieved to learn that it's (partly) because the code doesn't make
as much sense as it should.  😀

Apparently Eli is the only person that understands the code at present,
and I understand his reluctance to change something that works.  But
making the code easier to understand would enable more people to
actually handle the code.  So I'm in favour of improving the code.