From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: undo in loaddefs.el buffer Date: Sun, 26 Dec 2004 17:15:52 +0100 Message-ID: <41CEE3B8.9090600@swipnet.se> References: <200412211414.iBLEEZ903426@raven.dms.auburn.edu> <200412211541.iBLFfBc03861@raven.dms.auburn.edu> <87llbonyup.fsf@jurta.org> <200412260206.iBQ26wG17970@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1104078013 13672 80.91.229.6 (26 Dec 2004 16:20:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 26 Dec 2004 16:20:13 +0000 (UTC) Cc: juri@jurta.org, yamaoka@jpl.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 26 17:20:06 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cib7m-0004Bj-00 for ; Sun, 26 Dec 2004 17:20:06 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CibIX-0003GH-BD for ged-emacs-devel@m.gmane.org; Sun, 26 Dec 2004 11:31:13 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CibHz-0003DX-O4 for emacs-devel@gnu.org; Sun, 26 Dec 2004 11:30:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CibHy-0003D2-Gp for emacs-devel@gnu.org; Sun, 26 Dec 2004 11:30:38 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CibHy-0003CK-8X for emacs-devel@gnu.org; Sun, 26 Dec 2004 11:30:38 -0500 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cib4f-000232-LV; Sun, 26 Dec 2004 11:16:54 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20041226161652.KAYH6820.mxfep02.bredband.com@coolsville.localdomain>; Sun, 26 Dec 2004 17:16:52 +0100 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: Luc Teirlinck In-Reply-To: <200412260206.iBQ26wG17970@raven.dms.auburn.edu> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:31411 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:31411 Luc Teirlinck wrote: >Do `emacs -q', M-x ielm then: > >(let (last-nonmenu-event) (yes-or-no-p "prompt")) > >Now if you press any key, regular or modifier, say "a", Control, >Shift, nil is returned, like if you answered "No". This appears to be >an obvious bug. For the particular application we are worried about, >this is particularly bad, because "No" is the dangerous answer, the >one that might make Emacs crash. > > The behaviour to pop down on key press is present in CVS and 21.3. But this should only happen if the focus is on the frame and not the dialog. It also only happens for Lucid and Lesstif/Motif dialogs. The reason for this being in CVS is because it is in 21.3 :-). Personally I think it is a strange behaviour. However, I obviously did a typo when making the "pop down on ESC" (see below), so the Lucid pops down on any keypress when focus is on the dialog. This is now fixed. >If we repeat the experiment in 21.3, we see that the bug is not >present there. However, there is another bug. If we click the mouse >anywhere inside the Emacs frame, but outside the "Yes" button, nil is >returned. This is also a bug, which does _not_ occur in current CVS. >This seems to be a case of introducing one bug by fixing another > This way of popping down the dialog has been replaced by popping down by pressing ESC, which is more in line with what other applications and toolkits use. But the non-toolkit build uses menus instead of dialogs, so the behaviour is different. For popup menus, clicking outside means "cancel" so in that case it is popped down. The ESC thing was not implemented for the non-toolkit build, I guess I thought it wasn't that many people that used it and thus not worth it. So in CVS, dialogs does not pop down because of a click outside the dialog. The non-toolkit build is not a dialog but a menu, so it does pop down. ESC shall pop down dialogs, except for the non-toolkit build (not implemented, but easy to add). Any key pressed when the focus is on the Emacs frame and not the dialog pops down the Lucid and Lesstif/Motif dialog, to be compatible with 21.3. GTK and non-toolkit does not pop down on keypress outside the dialog/menu. Jan D.