unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: lispref/frames.texi and xmenu.c
Date: Tue, 3 May 2005 18:11:45 -0500 (CDT)	[thread overview]
Message-ID: <200505032311.j43NBja19188@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1DSkWr-0002iI-Gh@fencepost.gnu.org> (message from Richard Stallman on Mon, 02 May 2005 19:40:45 -0400)

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;
  {
============================================================

  reply	other threads:[~2005-05-03 23:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-01 13:35 lispref/frames.texi and xmenu.c Luc Teirlinck
2005-05-01 13:45 ` Andreas Schwab
2005-05-01 13:56   ` Luc Teirlinck
2005-05-01 14:06 ` Luc Teirlinck
2005-05-01 17:43 ` Jan D.
2005-05-01 21:04   ` Luc Teirlinck
2005-05-01 18:57 ` Richard Stallman
2005-05-01 20:32   ` Luc Teirlinck
2005-05-02  3:06   ` Luc Teirlinck
2005-05-02 23:40     ` Richard Stallman
2005-05-03 23:11       ` Luc Teirlinck [this message]
2005-05-04 22:05         ` Richard Stallman
2005-05-05  3:04           ` Luc Teirlinck
2005-05-05 19:46             ` Richard Stallman
2005-05-02  3:28   ` Luc Teirlinck
2005-05-01 19:01 ` Eli Zaretskii
2005-05-01 20:55   ` Luc Teirlinck
2005-05-02  3:33     ` Luc Teirlinck
  -- strict thread matches above, loose matches on Subject: below --
2005-04-30  2:02 Luc Teirlinck
2005-05-01 18:48 ` Luc Teirlinck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200505032311.j43NBja19188@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).