APPROVE COMMIT 21.4
Since this was long ago applied to 21.5, I think it's safe for the
21.4 branch. Thanks for the patch, it will appear in XEmacs 21.4.17,
"Jumbo Shrimp".
I applied this ChangeLog entry:
2004-03-30 Zajcev Evgeny <zevlg(a)yandex.ru>
* window.c: Declare `allow_deletion_of_last_visible_frame' extern.
* window.c (window_loop): [fix] Take into account
`allow-deletion-of-last-visible-frame' variable.
* window.c (replace-buffer-in-windows): Ditto.
- Vin
acs(a)xemacs.org writes:
Forwarded to xemacs-patches in order to follow due process.
Normally when you kill buffer dedicated to window and the window is
only one in frame, frame will be deleted also. But i found that if
frame is about to be deleted and there no other visible frames
`replace-buffer-in-windows' will skip value of
`allow-deletion-of-last-visible-frame' variable. Is not it be correct
by `replace-buffer-in-windows' to regard value of
`allow-deletion-of-last-visible-frame'?
Here is simple patch to fix this up:
======= Cut here =======
--- window.orig.c Thu Jan 22 10:19:33 2004
+++ window.c Thu Jan 22 10:02:49 2004
@@ -61,6 +61,8 @@
#endif
#endif
+extern int allow_deletion_of_last_visible_frame;
+
EXFUN (Fnext_window, 4);
static int window_pixel_width_to_char_width (struct window *w,
@@ -2919,7 +2921,8 @@
of its own, kill the frame. */
if (EQ (w, FRAME_ROOT_WINDOW (f))
&& !NILP (p->dedicated)
- && other_visible_frames (f))
+ && (allow_deletion_of_last_visible_frame
+ || other_visible_frames (f)))
{
/* Skip the other windows on this frame.
There might be one, the minibuffer! */
@@ -3371,7 +3374,8 @@
if (!NILP (XWINDOW (window)->dedicated)
&& EQ (window,
FRAME_ROOT_WINDOW (XFRAME (frame)))
- && other_visible_frames (XFRAME (frame)))
+ && (allow_deletion_of_last_visible_frame
+ || other_visible_frames (XFRAME (frame))))
{
delete_frame_internal (XFRAME (frame), 0, 0, 0); /* GC */
}
======= Cut ends here =======
Thanks!
--
lg