emacs-devel
[Top][All Lists]
Advanced

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

Re: undo in loaddefs.el buffer


From: Richard Stallman
Subject: Re: undo in loaddefs.el buffer
Date: Sun, 26 Dec 2004 23:09:45 -0500

    > (let (last-nonmenu-event) (yes-or-no-p "prompt"))

    This code displays a X popup menu when no toolkit is used.
    And it doesn't react to key presses.

In the no-toolkit case, Fx_popup_dialog just calls Fx_popup_menu.  I
think it is a bug that C-g doesn't work during them.  So this is a
bug.  I am not sure it is worth fixing, though.

However, with the x toolkit, Fx_popup_dialog explicitly pops down
when there is input.  Here's the code from popup_get_selection,
with the comment that explains it.  down_on_keypress is 1 for dialogs
and 0 for menus.

      /* If the user presses a key that doesn't go to the menu,
         deactivate the menu.
         The user is likely to do that if we get wedged.
         All toolkits now pop down menus on ESC.
         For dialogs however, the focus may not be on the dialog, so
         in that case, we pop down. */
      else if (event.type == KeyPress
               && down_on_keypress
               && dpyinfo->display == event.xbutton.display)

So it is an intentional feature.  It may not work exactly the right
way, but it's not a bug, ust eliminating it doesn't seem like the
right solution.




reply via email to

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