Subject: Re: bug#79306: Broken follow-mode

From: Eli Zaretskii <[email-masked]>
Date: Fri, 05 Sep 2025 09:45:30 +0300

> From: Stefan Monnier <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 04 Sep 2025 18:41:21 -0400
> 
> > I guess so (but we need a comment there explaining the reason for not
> > calling dsafe_call).  And why didn't you bind inhibit_quit?
> 
> I just wanted to express the intent.
> 
> > One other thing we should perhaps consider: before you introduced the
> > redisplay_counter thing, redisplay_internal would in this case return
> > immediately at the beginning:
> >
> >   /* I don't think this happens but let's be paranoid.  In particular,
> >      this was observed happening when Emacs shuts down due to losing X
> >      connection, in which case accessing SELECTED_FRAME and the frame
> >      structure is likely to barf.  */
> >   if (redisplaying_p)
> >     return;
> 
> Oh, very good point.
> So maybe we just need the last two hunks below and the not the first.

Sounds good, thanks.  Though if we do this, wouldn't it render the
entire machinery of redisplay_counter effectively disabled, since
redisplaying_p is set right after we increment redisplay_counter?

Juri, can you try those two hunks and see if there are any problems
left in follow-mode?