From xemacs-m  Sun Jun 29 20:00:40 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 UAA09197
	for <xemacs-beta@xemacs.org>; Sun, 29 Jun 1997 20:00:32 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQcwci00993; Sun, 29 Jun 1997 21:00:23 -0400 (EDT)
Date: Sun, 29 Jun 1997 21:00:23 -0400 (EDT)
Message-Id: <QQcwci00993.199706300100@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-beta@xemacs.org>
Subject: [PATCH] 20.3-b9: fix for [bug] no keyboard input was accepted....
In-Reply-To: <87radmajif.fsf@bittersweet.inetarena.com>
References: <87radmajif.fsf@bittersweet.inetarena.com>
X-Mailer: VM 6.33 under 20.3 "Sofia" XEmacs  Lucid (beta9)
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

Karl M. Hegbloom writes:
 >  I think this may be a manifestation of the same bug I've reported
 > before.  `stack-trace-on-error' was set, but I could not get to the
 > BackTrace buffer, if one was created.
 > 
 >  I was using W3, and customizing it using its edit->preferences menus.
 > I set the notify option to make frames, and didn't like it, since
 > pushing the back button makes a new frame (bad.).  So, I switched back
 > to using the current window, by going through the menus again and
 > resetting the option.
 > 
 >  After that, I couldn't type to XEmacs.  The menus, toolbar, and mouse
 > motion hightlight still work, but no keyboard, as before.  Browsing
 > links with the mouse worked too.

The cause of this and the similar lossage when you pass the mouse
over some string in customize buffers is read-only text being
poked into the echo area buffer and making the message clearing
code fail.

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

Sun Jun 29 20:57:15 1997  Kyle Jones  <kyle_jones@wonderworks.com>

	* lisp/prim/simple.el: bind inhibit-read-only to t before 
	  trying to erase or otherwise modify the echo area buffer.

--- 1.1	1997/06/30 00:24:27
+++ lisp/prim/simple.el	1997/06/30 00:29:30
@@ -3357,6 +3357,7 @@
   (let ((clear-stream (and message-stack (eq 'stream (frame-type frame)))))
     (remove-message label frame)
     (let ((buffer (get-buffer " *Echo Area*"))
+	  (inhibit-read-only t)
 	  (zmacs-region-stays zmacs-region-stays)) ; preserve from change
       (erase-buffer buffer))
     (if clear-stream
@@ -3395,7 +3396,8 @@
 	(error (setq remove-message-hook nil)
 	       (message "remove-message-hook error: %s" e)
 	       (sit-for 2)
-	       (erase-buffer (get-buffer " *Echo Area*"))
+	       (let ((inhibit-read-only t))
+		 (erase-buffer (get-buffer " *Echo Area*")))
 	       (signal (car e) (cdr e))))
       (setq log (cdr log)))))
 
@@ -3415,7 +3417,8 @@
 	  (zmacs-region-stays zmacs-region-stays)) ; preserve from change
       (save-excursion
 	(set-buffer buffer)
-	(insert message))
+	(let ((inhibit-read-only t))
+	  (insert message)))
       ;; Conditionalizing on the device type in this way is not that clean,
       ;; but neither is having a device method, as I originally implemented
       ;; it: all non-stream devices behave in the same way.  Perhaps

