Subject: bug#12170: save-excursion fails boundary case with recenter

From: martin rudalics <[email-masked]>
Date: Sat, 11 Aug 2012 18:05:14 +0200

> Maybe.  If it's really important,

It's not.

 > I could try looking at this in the
 > debugger, although doing so to investigate such situations is
 > notoriously hard, because redisplay is entered several times.
 >
 > IMO, save-excursion is simply not designed to make sure display isn't
 > changed in such cases.

Agreed.  But `save-window-excursion' doesn't handle this case either.
So the difference should be in one of the four assignments

   w->start_at_line_beg = 0;
   w->update_mode_line = 1;
   w->last_modified = 0;
   w->last_overlay_modified = 0;

and I'd obviously vote for the first one.  Interesting side-effect.

martin