[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/window.c
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/src/window.c |
Date: |
Wed, 05 Jun 2002 12:56:51 -0400 |
Index: emacs/src/window.c
diff -c emacs/src/window.c:1.415 emacs/src/window.c:1.416
*** emacs/src/window.c:1.415 Tue May 28 16:26:34 2002
--- emacs/src/window.c Thu May 30 13:04:59 2002
***************
*** 4938,4944 ****
Lisp_Object new_current_buffer;
Lisp_Object frame;
FRAME_PTR f;
- int old_point = -1;
while (!WINDOW_CONFIGURATIONP (configuration))
wrong_type_argument (Qwindow_configuration_p, configuration);
--- 4938,4943 ----
***************
*** 4949,4959 ****
new_current_buffer = data->current_buffer;
if (NILP (XBUFFER (new_current_buffer)->name))
new_current_buffer = Qnil;
- else
- {
- if (XBUFFER (new_current_buffer) == current_buffer)
- old_point = PT;
- }
frame = XWINDOW (SAVED_WINDOW_N (saved_windows, 0)->window)->frame;
f = XFRAME (frame);
--- 4948,4953 ----
***************
*** 5105,5112 ****
p->mark, w->buffer);
/* As documented in Fcurrent_window_configuration, don't
! save the location of point in the buffer which was current
! when the window configuration was recorded. */
if (!EQ (p->buffer, new_current_buffer)
&& XBUFFER (p->buffer) == current_buffer)
Fgoto_char (w->pointm);
--- 5099,5106 ----
p->mark, w->buffer);
/* As documented in Fcurrent_window_configuration, don't
! restore the location of point in the buffer which was
! current when the window configuration was recorded. */
if (!EQ (p->buffer, new_current_buffer)
&& XBUFFER (p->buffer) == current_buffer)
Fgoto_char (w->pointm);
***************
*** 5144,5149 ****
--- 5138,5148 ----
That swapping out has already been done,
near the beginning of this function. */
selected_window = Qnil;
+ if (EQ (XWINDOW (data->current_window)->buffer, new_current_buffer))
+ set_marker_restricted (XWINDOW (data->current_window)->pointm,
+ make_number (BUF_PT (XBUFFER (XWINDOW
(data->current_window)->buffer))),
+ XWINDOW (data->current_window)->buffer);
+
Fselect_window (data->current_window);
XBUFFER (XWINDOW (selected_window)->buffer)->last_selected_window
= selected_window;
***************
*** 5189,5199 ****
else if (EQ (leaf_windows[i]->buffer, new_current_buffer))
++n;
}
-
- /* If more than one window shows the new and old current buffer,
- don't try to preserve point in that buffer. */
- if (old_point > 0 && n > 1)
- old_point = -1;
adjust_glyphs (f);
--- 5188,5193 ----
***************
*** 5213,5227 ****
}
if (!NILP (new_current_buffer))
! {
! Fset_buffer (new_current_buffer);
!
! /* If the buffer that is current now is the same
! that was current before setting the window configuration,
! don't alter its PT. */
! if (old_point >= 0)
! SET_PT (old_point);
! }
/* Restore the minimum heights recorded in the configuration. */
window_min_height = XINT (data->min_height);
--- 5207,5213 ----
}
if (!NILP (new_current_buffer))
! Fset_buffer (new_current_buffer);
/* Restore the minimum heights recorded in the configuration. */
window_min_height = XINT (data->min_height);
- [Emacs-diffs] Changes to emacs/src/window.c,
Eli Zaretskii <=