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: Eli Zaretskii
Subject: bug#64596: 30.0.50; On FIXME: in src/buffer.c:1481 (force-mode-line-update)
Date: Sun, 16 Jul 2023 14:31:29 +0300

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: monnier@iro.umontreal.ca, 64596@debbugs.gnu.org
> 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?

They all force redisplay, yes, but in different ways.  For example,
the frame's garbaged flag means the entire frame with all its windows
and decorations might need to be redrawn.  By contrast,
prevent_redisplay_optimizations_p just means "don't use some of the
redisplay optimizations that we otherwise could be tempted to try".
IOW, not redisplaying a window at all is not an "optimization".

> > 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?

Historical reasons.  But such naming convention is of secondary
importance, IME.  As long as the names are not completely misleading,
and their effects are well documented, 90% of the job is done.





reply via email to

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