emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: select-window and select-frame


From: Stefan Monnier
Subject: Re: select-window and select-frame
Date: Tue, 29 Oct 2002 14:36:08 -0500

>     I think this change of behavior in select-window is bad and should
>     be reverted.  It is incompatible and does break existing code.
> 
> The solution I implemented seems to be bad, but it is not clear what a
> good solution is.
> 
> The original problem is that
> 
>   (save-selected-window
>     (select-window ...)
>     ..)
> 
> can permanently alter the frame-selected-window of a frame.  I tried
> solving it by making select-window not alter the frame-selected-window
> of a frame that isn't selected.  If we don't solve it that way, we need
> to solve it some other way, but what?

The problem is not so much with the "don't alter the frame-selected-window
of a frame that isn't selected" but with the fact that select-window does
not select the window's frame any more.

I think the best solution I can think of is to add an argument
to select-window which controls whether to change the selected-frame
or not (i.e. choose between the old and the new behavior).  That
means that code will need to be changed to fix the original problem,
but it seems that the original problem is not as important
as the problems introduced by the current fix.

Maybe the default could even be controlled by a variable that
could be temporarily bound by save-selected-window, although
I'm not sure if that's a good idea or not.


        Stefan





reply via email to

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