[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lispref/frames.texi and xmenu.c

From: Jan D.
Subject: Re: lispref/frames.texi and xmenu.c
Date: Sun, 01 May 2005 19:43:52 +0200
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]