From xemacs-m  Fri May  2 22:07:49 1997
Received: from altair.xemacs.org (xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id WAA27687
	for <xemacs-beta@xemacs.org>; Fri, 2 May 1997 22:07:47 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id UAA04218;
	Fri, 2 May 1997 20:08:56 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: wrong-type-argument frame-live-p
References: <199705022113.PAA22476@branagh.ta52.lanl.gov>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: "John A. Turner"'s message of Fri, 2 May 1997 15:13:46 -0600
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: 02 May 1997 20:08:53 -0700
Message-ID: <m267x15k1m.fsf@altair.xemacs.org>
Lines: 52
X-Mailer: Gnus v5.4.50/XEmacs 20.2(beta5)

John A Turner <turner@lanl.gov> writes:

> I use the pcl-cvs interface to CVS regularly, but I usually invoke it
> by M-x cvs-update.  I'm not sure why, but today I invoked it via the
> menu, Tools -> VC -> CVS Update Directory, and got the following in
> the *Backtrace* buffer (after turning on debug-on-error):

> [2 backtrace <text/plain>]
> Signaling: (wrong-type-argument frame-live-p #<dead-frame nil 0x38849>)
>   select-frame(#<dead-frame nil 0x38849>)
>   get-dialog-box-response(#<buttondown-event button1> ("Save file 

Ugh!

The critical thing seems to be to the logic about checking
`last-command-event' to see if it was a mouse event, which in this
case is a dead confirmation dialog box. :-(

This bug probably exists in 19.15 too.

Here is a bandaid that forces minibuffer usage if `save-some-buffers'
decides to prompt.

Fri May  2 20:04:35 1997  Steven L Baur  <steve@altair.xemacs.org>

	* pcl-cvs.el (cvs-update): Inhibit dialog box usage in call to
	cvs-do-update as this bombs when this function is invoked from a
	menu.

Index: lisp/pcl-cvs/pcl-cvs.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/pcl-cvs/pcl-cvs.el,v
retrieving revision 1.3
diff -u -r1.3 pcl-cvs.el
--- pcl-cvs.el	1997/03/22 06:02:36	1.3
+++ pcl-cvs.el	1997/05/03 03:04:03
@@ -507,7 +507,10 @@
   (interactive (list (read-file-name "CVS Update (directory): "
 				     nil default-directory nil)
 		     current-prefix-arg))
-  (cvs-do-update directory local nil)
+  ;; If the previous prompt was in a dialog box, the save-some-buffers
+  ;; call in cvs-do-update will lose.
+  (let ((use-dialog-box nil))
+    (cvs-do-update directory local nil))
   (switch-to-buffer cvs-buffer-name))
 
 ;;----------

-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

