Subject: Re: bug#7728: 24.0.50; GDB backtrace from abort

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Jan 2011 12:48:32 -0500

> Date: Wed, 12 Jan 2011 18:42:55 +0100
> From: martin rudalics <[email-masked]>
> CC: Stefan Monnier <[email-masked]>, [email-masked]
> 
>  > Are you saying tha this isn't kosher, because the body of
>  > save-window-excursion is not allowed to select a different frame?
> 
> I doubt it's kosher because if the old selected window is not on the
> restored frame and a window on the restored frame gets selected, the
> point of the buffer whose window is deselected is not stored in the old
> selected window's pointm which is certainly not TRT.

But I bet Drew's code works just fine, when it does not crash.

Anyway, if switching away of the frame inside save-window-excursion is
not allowed, we should detect that and signal an error.  That would
solve this bug cleanly, with no need for any low-level hacking or
kludges.

> To avoid the present crash we could try something like the attached
> patch (which does not try to solve anything but that crash).

But if you say that switching a frame inside save-window-excursion is
not supported, why do we need to change code to support it?  What am I
missing?