From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: lispref/frames.texi and xmenu.c Date: Sun, 01 May 2005 19:43:52 +0200 Message-ID: <42751558.4020007@swipnet.se> References: <200505011335.j41DZK123269@raven.dms.auburn.edu> NNTP-Posting-Host: main.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 1114973790 12098 80.91.229.2 (1 May 2005 18:56:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 1 May 2005 18:56:30 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 01 20:56:27 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSJb6-00040Y-1M for ged-emacs-devel@m.gmane.org; Sun, 01 May 2005 20:55:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSJhq-00043K-Ho for ged-emacs-devel@m.gmane.org; Sun, 01 May 2005 15:02:18 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSIau-0008S9-IE for emacs-devel@gnu.org; Sun, 01 May 2005 13:51:04 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSIZj-0007oI-HU for emacs-devel@gnu.org; Sun, 01 May 2005 13:49:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSIVy-0005r2-2S for emacs-devel@gnu.org; Sun, 01 May 2005 13:45:58 -0400 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DSIYh-0006qV-Ix for emacs-devel@gnu.org; Sun, 01 May 2005 13:48:47 -0400 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep01.bredband.com with ESMTP id <20050501174426.VYXZ20083.mxfep01.bredband.com@coolsville.localdomain>; Sun, 1 May 2005 19:44:26 +0200 User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en Original-To: Luc Teirlinck In-Reply-To: <200505011335.j41DZK123269@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: news.gmane.org gmane.emacs.devel:36548 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36548 Luc Teirlinck wrote: >I propose the changes below to lispref/frames.texi and xmenu.texi. >They concern x-popup-{menu,dialog}. I can install if desired. > >I am not sure whether we should document (which the patches below do) >or fix one difference between `x-popup-dialog' and `x-popup-menu'. >When the user quits or pops down the menu, `x-popup-menu' just returns >nil, while `x-popup-dialog' actually quits and returns no value. If I >remember correctly, the latter behavior is relatively recent and was >the result of a discussion on emacs-devel. That behavior was >implemented because we did not want to have popping down the dialog or >quitting automatically invoke the action associated with answering >"n(o)" to a y(es)-or-n(o)-p question. I still believe that this >change made sense. The question is whether for consistency, a similar >change should be made for `x-popup-menu'. (Maybe this is too close to >a release for such a change, but then again, we changed `x-popup-dialog') >As already said, the patches below just document the difference. > > I think making x-popup-dialog and x-popup-menu should be made to behave the same. However, since menus are used more in Emacs than dialogs, there is a bigger risk involved. >However, from : > > In some configurations, Emacs cannot display a real dialog box; > so instead it displays the same items in a pop-up menu in the > center of the frame. > >I can not check, but does quitting or popping down that popup-menu >when `x-popup-dialog' is used in this situation quit or return nil? > > Quit. But it does that by checking if the menu was invoked with the mouse. If it was invoked by the mouse, we return nil, otherwise we quit. So if a menu is popped up programatically by x-popup-menu, it will also quit even if it is not popped up as a dialog. This makes me wonder if there is code that expects nil from menus, since the code tries to keep that distinction. Jan D.