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

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

bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-upda


From: Ihor Radchenko
Subject: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update)
Date: Sun, 16 Jul 2023 10:47:55 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> I agree about must_be_updated_p. I had exactly same though that it is
>> redundant with redisplay flag when reading the code.
>
> Look closer, please.  The name of the flag might suggest what you say,
> but its usage suggests otherwise.

Do I understand correctly that prevent_display_optimizations_p in
buffer, must_be_updated_p in window, and garbaged in frames all serve
the same purpose of forcing the redisplay?

>> prevent_redisplay_optimizations_p is intuitively logical, but I still
>> feel confused because it appears to be redundant upon seeing redisplay
>> flag in the buffer. It raises a question what redisplay flag really
>> means - it is causing redisplay of a window/buffer or not necessarily?
>
> Neither.
>
> The redisplay flag means that a window or a buffer or a frame need to
> be _considered_ for potential redisplay.  (Whether the consideration
> will conclude there's a need to actually redraw the corresponding part
> of the Emacs display is another matter -- it could conclude that all,
> some parts of, or none of the objects marked for redisplay actually
> need it.)
>
> prevent_redisplay_optimizations_p says that while considering which
> parts of the buffer need to cause redisplay, certain shortcuts and
> optimizations designed to make redisplay faster and less expensive
> must not be taken/used.
>
> IOW, prevent_redisplay_optimizations_p must come with the redisplay
> flag set on the buffer/window/frame, but after that it says a
> different thing.

Then, why not use uniform naming scheme and have the buffer/window/frame
flags names as maybe_redisplay and must_redisplay instead of different
flag name for different object type?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>





reply via email to

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