palmieri(a)math.washington.edu (John H. Palmieri) writes:
Briefly, my problem is: with XEmacs 21.2-b35, it seems that the
function 'set-window-configuration changes the point, and I don't
think it should.
In detail (and I posted this before, with no response): I have some
code that does this:
;; start with the point in window 1.
(setq bozo (current-window-configuration))
...
;; do stuff that puts the point in the minibuffer, and also opens up
;; window 2, leaving both windows 1 and 2 visible
...
(set-window-configuration bozo)
In XEmacs 21.1.12 and GNU Emacs, the end result would be that the
window 2 would go away, and the point would remain in the minibuffer.
In XEmacs 21.2-b35, window 2 goes away, but the point also jumps back
to window 1. I think this is in contradiction with the documentation
for current-window-configuration, which says
Documentation:
Return an object representing the current window configuration of FRAME.
If FRAME is nil or omitted, use the selected frame.
This describes the number of windows, their sizes and current buffers,
and for each displayed buffer, where display starts, and the positions of
point and mark. An exception is made for point in the current buffer:
its value is -not- saved.
Note the last sentence. Because of this, set-window-configuration
shouldn't change the point. This looks like a bug to me, or was this
behavior changed intentionally, and the documentation not updated?
I thinks that behavior was introduced by this change.
2000-03-17 Andy Piper <andy(a)xemacs.org>
(Fcurrent_window_configuration): in general do not save the
minibuffer as the selected window.
Relevant piece of code is:
/* When using `push-window-configuration', often the minibuffer ends
up as the selected window because functions run as the result of
user interaction e.g. hyper-apropos. It seems to me the sensible
thing to do is not record the minibuffer here. */
if (FRAME_MINIBUF_ONLY_P (f) || minibuf_level)
config->current_window = FRAME_SELECTED_WINDOW (f);
else
config->current_window = FRAME_LAST_NONMINIBUF_WINDOW (f);
I don't know why minibuffer window should not be the
selected window, but it is an intentional change. Andy,
could you please explain why?
--
Yoshiki Hayashi