From xemacs-m  Sat Jun  7 21:04:10 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id VAA13653
	for <xemacs-beta@xemacs.org>; Sat, 7 Jun 1997 21:04:09 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQcszg02082; Sat, 7 Jun 1997 22:04:09 -0400 (EDT)
Date: Sat, 7 Jun 1997 22:04:09 -0400 (EDT)
Message-Id: <QQcszg02082.199706080204@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: [PATCH] 20.3-b4: fix for sayonara make-face bug
X-Mailer: VM 6.33 under 20.3 XEmacs Lucid (beta4)
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

xemacs -nw

(setq f (make-frame-on-display ":3"))
(delete-frame f)
(make-face 'foo)

After this I see

Error: Couldn't find per display information

and XEmacs has exited.  No tty setting cleanup, no autosave, no
nothing.  Outta here.

Here's a patch.  Recommended for the official 19.15 patches.

Sat Jun  7 22:00:54 1997  Kyle Jones  <kyle_jones@wonderworks.com>

	* src/device-x.c (x_delete_device):
	  Add an EQ check so that we don't set Vdefault_x_device
	  back to the device we're deleting.

--- 1.1	1997/06/08 01:47:15
+++ src/device-x.c	1997/06/08 01:48:21
@@ -391,7 +391,8 @@
       Vdefault_x_device = Qnil;
       DEVICE_LOOP_NO_BREAK (devcons, concons)
 	{
-	  if (DEVICE_X_P (XDEVICE (XCAR (devcons))))
+	  if (DEVICE_X_P (XDEVICE (XCAR (devcons))) &&
+	      !EQ (device, XCAR (devcons)))
 	    {
 	      Vdefault_x_device = XCAR (devcons);
 	      goto double_break;

