mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-14 03:37:38 -08:00
* window.c (delete_all_subwindows): Save the window's buffer in
its `height' field; we may need to know the window's old buffer once we have restored it from a window configuration. Fset_window_configuration): When we restore a window, if its `height' field is a buffer, restore its `buffer' field from that. This allows us to leave the window's buffer unchanged if the buffer recorded in the configuration is dead. * window.c (delete_all_subwindows): Removed unused variable named "count".
This commit is contained in:
parent
fde3a52f24
commit
9ace597fcf
1 changed files with 13 additions and 3 deletions
16
src/window.c
16
src/window.c
|
|
@ -2386,8 +2386,13 @@ by `current-window-configuration' (which see).")
|
|||
if (NILP (XBUFFER (new_current_buffer)->name))
|
||||
new_current_buffer = Qnil;
|
||||
|
||||
/* Mark all windows now on frame as "deleted".
|
||||
Restoring the new configuration "undeletes" any that are in it. */
|
||||
/* Kludge Alert!
|
||||
Mark all windows now on frame as "deleted".
|
||||
Restoring the new configuration "undeletes" any that are in it.
|
||||
|
||||
Save their current buffers in their height fields, since we may
|
||||
need it later, if the buffer saved in the configuration is now
|
||||
dead. */
|
||||
delete_all_subwindows (XWINDOW (FRAME_ROOT_WINDOW (f)));
|
||||
|
||||
for (k = 0; k < saved_windows->size; k++)
|
||||
|
|
@ -2423,6 +2428,11 @@ by `current-window-configuration' (which see).")
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If we squirreled away the buffer in the window's height,
|
||||
restore it now. */
|
||||
if (XTYPE (w->height) == Lisp_Buffer)
|
||||
w->buffer = w->height;
|
||||
w->left = p->left;
|
||||
w->top = p->top;
|
||||
w->width = p->width;
|
||||
|
|
@ -2506,7 +2516,7 @@ static void
|
|||
delete_all_subwindows (w)
|
||||
register struct window *w;
|
||||
{
|
||||
register int count = 1;
|
||||
w->height = w->buffer; /* See Fset_window_configuration for excuse. */
|
||||
w->buffer = Qnil;
|
||||
if (!NILP (w->next))
|
||||
delete_all_subwindows (XWINDOW (w->next));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue