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: Tue, 3 May 2005 18:11:45 -0500 (CDT) Message-ID: <200505032311.j43NBja19188@raven.dms.auburn.edu> References: <200505011335.j41DZK123269@raven.dms.auburn.edu> <200505020306.j4236xc26850@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1115235677 2343 80.91.229.2 (4 May 2005 19:41:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 4 May 2005 19:41:17 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 04 21:41:14 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTPjK-0001KV-6f for ged-emacs-devel@m.gmane.org; Wed, 04 May 2005 21:40:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTPqg-0007id-Ts for ged-emacs-devel@m.gmane.org; Wed, 04 May 2005 15:47:59 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DT91E-0000Mc-Ue for emacs-devel@gnu.org; Tue, 03 May 2005 21:49:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DT91C-0000Lg-Sq for emacs-devel@gnu.org; Tue, 03 May 2005 21:49:43 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DT90b-0007yy-Bh for emacs-devel@gnu.org; Tue, 03 May 2005 21:49:05 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DT8xV-0002Jc-3h; Tue, 03 May 2005 21:45:53 -0400 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by mx20.gnu.org with esmtp (Exim 4.34) id 1DT6hp-00065m-OP; Tue, 03 May 2005 19:21:33 -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 j43NBwog008407; Tue, 3 May 2005 18:11:58 -0500 (CDT) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j43NBja19188; Tue, 3 May 2005 18:11:45 -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 Mon, 02 May 2005 19:40:45 -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:36648 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36648 Here are my proposed patches to lispref/frames.texi and xmenu.c. As always, I can install if desired. My text assumes that in situations where `x-popup-dialog' has to actually use a menu instead of a dialog box, doing M-: (x-popup-dialog (read-event) '("PANE" ("LINE1" . 1))) then clicking the mouse to make the menu pop up and then getting rid of that menu without making a valid choice actually returns nil without quitting. (It produces a quit if a real dialog box is used.) I can not check this, but I deduce from Jan's comments that this is correct. ===File ~/lispref-frames.texi-diff========================== *** frames.texi 01 May 2005 16:35:35 -0500 1.86 --- frames.texi 03 May 2005 17:26:27 -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,1490 ---- 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 normally results in a + quit and @code{x-popup-dialog} returns no value. The only exception + occurs in those situations where Emacs has to use a menu instead of a + dialog box and @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-dialog} returns @code{nil}. @end defun @node Pointer Shapes ============================================================ ===File ~/xmenu.c-diff====================================== *** xmenu.c 01 May 2005 16:37:06 -0500 1.287 --- xmenu.c 03 May 2005 17:41:38 -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,1030 ---- 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.) ! ! 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 normally results in a ! quit and `x-popup-dialog' returns no value. The only exception occurs ! in those situations where Emacs has to use a menu instead of a dialog ! box and POSITION is a mouse button event (indicating that the user ! invoked the menu with the mouse); then no quit occurs and ! `x-popup-dialog' returns nil. */) (position, contents) Lisp_Object position, contents; { ============================================================