From xemacs-m  Tue Apr  1 16:02:10 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id QAA23978
	for <xemacs-beta@xemacs.org>; Tue, 1 Apr 1997 16:02:07 -0600 (CST)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id OAA16636;
	Tue, 1 Apr 1997 14:14:45 -0800
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: mailcrypt in xemacs-20.1-b10
References: <m0wC8c9-000mUTC@i.control.att.com>
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: Larry Auton's message of Tue, 1 Apr 97 13:49 EST
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: 01 Apr 1997 14:14:41 -0800
Message-ID: <m2u3lq9yr2.fsf@altair.xemacs.org>
Lines: 59
X-Mailer: Gnus v5.4.39/XEmacs 20.1(beta11)

Larry Auton writes:

> By "doing the wrong thing" I found that I could get mailcrypt to
> crash.  Xemacs handled it fine so no damage was done.  I assume that
> this is an error with mailcrypt, rather than VM 6.22 or Xemacs.

Nope.  It's a bug in XEmacs.

 ...
> The minibuffer said:

> Wrong type argument: "unable to bind this type of event", #<misc-user-event (scrollbar-vertical-drag (#<window on "edit of [Sender and Subject of the message]" 0xc337 . 663))>

> and a *Backtrace* buffer popped up as follows:

 ...
>   key-binding(#<misc-user-event (scrollbar-vertical-drag (#<window on "edit of AlanB's note re: Re: UWIN is cool" 0xc33> . 663))>)
 ...
>   y-or-n-p-minibuf("Replace encrypted message with decrypted? ")
    ^^^^^^^^^^^^^^^^
 ...

y-or-n-p-minibuf takes an unchecked event and does an unconditional
keymap lookup.  The keymap lookup code conveniently bombs instead of
returning nil if it is given an event which cannot be bound to a key,
like scrollbar motion. :-(

This may not be exactly what you want, but it gets rid of the error.
Hitting the scrollbar now cancels the prompt as if C-g was pressed.

Vin, this should go on the 19.15 patch page because 19.15 has the same 
bug.

Index: lisp/prim/cmdloop.el
===================================================================
RCS file: /usr/local/xemacs/xemacs-20.0/lisp/prim/cmdloop.el,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 cmdloop.el
--- cmdloop.el	1996/12/18 22:42:57	1.1.1.1
+++ cmdloop.el	1997/04/01 22:07:58
@@ -341,9 +341,11 @@
                   (inhibit-quit t))
               (message "%s%s%s" pre prompt yn)
               (setq event (next-command-event event))
-              (prog1
-		  (or quit-flag (eq 'keyboard-quit (key-binding event)))
-		(setq quit-flag nil)))
+	      (condition-case nil
+		  (prog1
+		      (or quit-flag (eq 'keyboard-quit (key-binding event)))
+		    (setq quit-flag nil))
+		(wrong-type-argument t)))
             (progn
               (message "%s%s%s%s" pre prompt yn (single-key-description event))
               (setq quit-flag nil)

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

