diff options
| author | Chong Yidong | 2011-07-02 19:40:04 -0400 |
|---|---|---|
| committer | Chong Yidong | 2011-07-02 19:40:04 -0400 |
| commit | 7a8e04f79efdefcb3eb7cb2cf5dbb454a78cf24e (patch) | |
| tree | 06539b2037155e83e91bc1c49f6a997662c690ab /src/keyboard.c | |
| parent | 83319045a48fbe15d9223056435c72ee5172bc2b (diff) | |
| download | emacs-7a8e04f79efdefcb3eb7cb2cf5dbb454a78cf24e.tar.gz emacs-7a8e04f79efdefcb3eb7cb2cf5dbb454a78cf24e.zip | |
Fix corner case in prefix-arg handling for mouse events (Bug#1586).
* src/keyboard.c (command_loop_1): If a down-mouse event is unbound,
leave any prefix arg for the up event.
Diffstat (limited to 'src/keyboard.c')
| -rw-r--r-- | src/keyboard.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 3441f1dfd12..16300e6154c 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1539,7 +1539,18 @@ command_loop_1 (void) | |||
| 1539 | message_with_string ("%s is undefined", keys, 0); | 1539 | message_with_string ("%s is undefined", keys, 0); |
| 1540 | KVAR (current_kboard, defining_kbd_macro) = Qnil; | 1540 | KVAR (current_kboard, defining_kbd_macro) = Qnil; |
| 1541 | update_mode_lines = 1; | 1541 | update_mode_lines = 1; |
| 1542 | KVAR (current_kboard, Vprefix_arg) = Qnil; | 1542 | /* If this is a down-mouse event, don't reset prefix-arg; |
| 1543 | pass it to the command run by the up event. */ | ||
| 1544 | if (EVENT_HAS_PARAMETERS (last_command_event)) | ||
| 1545 | { | ||
| 1546 | Lisp_Object breakdown | ||
| 1547 | = parse_modifiers (EVENT_HEAD (last_command_event)); | ||
| 1548 | int modifiers = XINT (XCAR (XCDR (breakdown))); | ||
| 1549 | if (!(modifiers & down_modifier)) | ||
| 1550 | KVAR (current_kboard, Vprefix_arg) = Qnil; | ||
| 1551 | } | ||
| 1552 | else | ||
| 1553 | KVAR (current_kboard, Vprefix_arg) = Qnil; | ||
| 1543 | } | 1554 | } |
| 1544 | else | 1555 | else |
| 1545 | { | 1556 | { |