Subject: bug#4970: 23.1; Emacs Gtk running nuts

From: Jan Djärv <[email-masked]>
Date: Wed, 25 Nov 2009 19:02:09 +0100

Dr. Werner Fink skrev:
> Hi,
> 
> I'd like to ask if there is a solution for this problem.
> I've read the thread carefully but at last I've not seen
> any real solution. is it allowed to remove the check
> 
>   if (last_terminal)
>       error ("Attempt to delete the sole terminal device with live frames");
> 
> in delete_tty() of src/term.c or will emacs then loop
> with
> 
>   if (NILP (force) && !other_visible_frames (f))
>     error ("Attempt to delete the sole visible or iconified frame");
> 
> in delete_frame() of src/frame.c ... ?
> 

For the case you posted, it is safe.  delete_frame is called with force set to 
Qnoelisp, which is not NILP (force) so the test is not run.
I've checked that in, it fixes this bug.

	Jan D.