[Top][All Lists]

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

Re: scratch/tzz/prettify-text-mode f8b4f20 1/3: lisp/progmodes/prog-mode

From: Stefan Monnier
Subject: Re: scratch/tzz/prettify-text-mode f8b4f20 1/3: lisp/progmodes/prog-mode.el: prevent font-lock-flush boundary errors
Date: Sun, 23 Aug 2020 17:19:31 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> SM> Could you add in the comment some explanation for why this is needed
> SM> (e.g. a known case where this happens)?
> It happened for me at the end of the buffer with multi-character
> coverups, when I deleted backwards.

Is it reproducible?  Try to include this info in the comment.

> It was simply that the cached end point was beyond the end of the
> buffer, hence the fix.

That's the part I can guess based on the code, but what I'm after is
rather: when or why is the "cached end point" stale?

To my naive eye it looks like a bug in the cache management (and hence
this patch should be replaced with a real fix), but maybe there's a good
reason for that (e.g. it's too hard to keep the cache up-to-date in
some circumstances, or something, or the cache does not even attempt to
be up-to-date).


reply via email to

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