Subject: bug#25380: 25.1; save-window-excursion problem in batch mode

From: Eli Zaretskii <[email-masked]>
Date: Tue, 10 Jan 2017 19:11:27 +0200

> Date: Mon, 09 Jan 2017 18:44:23 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> >  > I just ran Emacs under a debugger with a breakpoint in
> >  > Fcurrent_window_configuration, then put a watchpoint on every top_line
> >  > member of every window that got saved there, and waited for it to
> >  > break.
> > 
> > That's obvious.  But how do I find out where that menubar line gets set?
> 
> I will see what I can do about that.

Further debugging reveals that I was mistaken: the frame's
FRAME_MENU_BAR_LINES value is already 1 when Emacs starts.  The
problem is that the window's top is not in sync with that value; I
guess resize_frame_windows was never called for the windows of the
frame, not even in temacs.

So perhaps one possible solution would be to call resize_frame_windows
somehow during temacs run.

> Could this be related to the bug#18136, bug#18196 woes?

Only tangentially, I think.  IOW, the same code is involved here, but
the menu-bar lines value is correct in this case.