mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-04 11:00:45 -08:00
(read_char): Fix case where last_nonmenu_event
returned a bad value with submenus. (Bug#447)
This commit is contained in:
parent
6bbd9b3200
commit
a41240a3ab
2 changed files with 14 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2009-01-12 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* keyboard.c (read_char): Fix case where last_nonmenu_event
|
||||
returned a bad value with submenus. (Bug#447)
|
||||
|
||||
2009-01-12 Chong Yidong <cyd@stupidchicken.com>
|
||||
|
||||
* xfaces.c (Finternal_set_lisp_face_attribute): If setting the
|
||||
|
|
|
|||
|
|
@ -2547,6 +2547,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
|
|||
|
||||
if (CONSP (Vunread_command_events))
|
||||
{
|
||||
int was_disabled = 0;
|
||||
|
||||
c = XCAR (Vunread_command_events);
|
||||
Vunread_command_events = XCDR (Vunread_command_events);
|
||||
|
||||
|
|
@ -2567,12 +2569,17 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time)
|
|||
if (CONSP (c)
|
||||
&& EQ (XCDR (c), Qdisabled)
|
||||
&& (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c))))
|
||||
c = XCAR (c);
|
||||
{
|
||||
was_disabled = 1;
|
||||
c = XCAR (c);
|
||||
}
|
||||
|
||||
/* If the queued event is something that used the mouse,
|
||||
set used_mouse_menu accordingly. */
|
||||
if (used_mouse_menu
|
||||
&& (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar)))
|
||||
/* Also check was_disabled so last-nonmenu-event won't return
|
||||
a bad value when submenus are involved. (Bug#447) */
|
||||
&& (EQ (c, Qtool_bar) || EQ (c, Qmenu_bar) || was_disabled))
|
||||
*used_mouse_menu = 1;
|
||||
|
||||
goto reread_for_input_method;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue