From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: lispref/frames.texi and xmenu.c Date: Wed, 4 May 2005 22:04:23 -0500 (CDT) Message-ID: <200505050304.j4534NA00111@raven.dms.auburn.edu> References: <200505011335.j41DZK123269@raven.dms.auburn.edu> <200505020306.j4236xc26850@raven.dms.auburn.edu> <200505032311.j43NBja19188@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1115262384 25631 80.91.229.2 (5 May 2005 03:06:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 May 2005 03:06:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu May 05 05:06:22 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTWgh-0002tm-7X for ged-emacs-devel@m.gmane.org; Thu, 05 May 2005 05:06:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTWo8-0002aV-0r for ged-emacs-devel@m.gmane.org; Wed, 04 May 2005 23:13:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DTWnY-0002OZ-Gn for emacs-devel@gnu.org; Wed, 04 May 2005 23:13:12 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DTWnR-0002Kl-EI for emacs-devel@gnu.org; Wed, 04 May 2005 23:13:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTWnR-0002FU-6v for emacs-devel@gnu.org; Wed, 04 May 2005 23:13:05 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DTWkL-0005Om-GD; Wed, 04 May 2005 23:09:53 -0400 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j4534dog015869; Wed, 4 May 2005 22:04:39 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j4534NA00111; Wed, 4 May 2005 22:04:23 -0500 (CDT) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Wed, 04 May 2005 18:05:08 -0400) 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:36693 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36693 Richard Stallman wrote: I think that assumption is not true. From reading the code, x-popup-dialog ALWAYS quits if the user doesn't make a valid choice. That is good, since it gives a lot more consistent behavior. What about the following patches, which take this into account? ===File ~/lispref-frames.texi-diff-2======================== *** frames.texi 01 May 2005 16:35:35 -0500 1.86 --- frames.texi 04 May 2005 17:16:03 -0500 *************** *** 1402,1407 **** --- 1402,1414 ---- where @var{line} is a string, and @var{value} is the value to return if that @var{line} is chosen. An item can also be a string; this makes a non-selectable line in the menu. + + If the user gets rid of the menu without making a valid choice, for + instance by clicking the mouse away from a valid choice or by typing + keyboard input, then this normally results in a quit and + @code{x-popup-menu} returns no value. But if @var{position} is a + mouse button event (indicating that the user invoked the menu with the + mouse) then no quit occurs and @code{x-popup-menu} returns @code{nil}. @end defun @strong{Usage note:} Don't use @code{x-popup-menu} to display a menu *************** *** 1470,1475 **** --- 1477,1486 ---- 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. + + If the user gets rid of the dialog box without making a valid choice, + for instance using the window manager, then this produces a quit and + @code{x-popup-dialog} returns no value. @end defun @node Pointer Shapes ============================================================ ===File ~/xmenu.c-diff-2==================================== *** xmenu.c 01 May 2005 16:37:06 -0500 1.287 --- xmenu.c 04 May 2005 21:43:24 -0500 *************** *** 767,773 **** With this form of menu, the return value is VALUE from the chosen item. If POSITION is nil, don't display the menu at all, just precalculate the ! cached information about equivalent key sequences. */) (position, menu) Lisp_Object position, menu; { --- 767,780 ---- With this form of menu, the return value is VALUE from the chosen item. If POSITION is nil, don't display the menu at all, just precalculate the ! cached information about equivalent key sequences. ! ! If the user gets rid of the menu without making a valid choice, for ! instance by clicking the mouse away from a valid choice or by typing ! keyboard input, then this normally results in a quit and ! `x-popup-menu' returns no value. But if POSITION is a mouse button ! event (indicating that the user invoked the menu with the mouse) then ! no quit occurs and `x-popup-menu' returns nil. */) (position, menu) Lisp_Object position, menu; { *************** *** 1005,1011 **** An ITEM may also be just a string--that makes a nonselectable item. An ITEM may also be nil--that means to put all preceding items on the left of the dialog box and all following items on the right. ! \(By default, approximately half appear on each side.) */) (position, contents) Lisp_Object position, contents; { --- 1012,1022 ---- An ITEM may also be just a string--that makes a nonselectable item. An ITEM may also be nil--that means to put all preceding items on the left of the dialog box and all following items on the right. ! \(By default, approximately half appear on each side.) ! ! If the user gets rid of the dialog box without making a valid choice, ! for instance using the window manager, then this produces a quit and ! `x-popup-dialog' returns no value. */) (position, contents) Lisp_Object position, contents; { ============================================================