[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r104891: Fix corner case in prefix-ar
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r104891: Fix corner case in prefix-arg handling for mouse events (Bug#1586). |
Date: |
Sat, 02 Jul 2011 19:40:04 -0400 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 104891
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-07-02 19:40:04 -0400
message:
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.
modified:
src/ChangeLog
src/keyboard.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-07-02 16:18:24 +0000
+++ b/src/ChangeLog 2011-07-02 23:40:04 +0000
@@ -1,3 +1,8 @@
+2011-07-02 Chong Yidong <address@hidden>
+
+ * keyboard.c (command_loop_1): If a down-mouse event is unbound,
+ leave any prefix arg for the up event (Bug#1586).
+
2011-07-02 Lars Magne Ingebrigtsen <address@hidden>
* lread.c (syms_of_lread): Mention single symbols defined by
=== modified file 'src/keyboard.c'
--- a/src/keyboard.c 2011-07-02 04:27:41 +0000
+++ b/src/keyboard.c 2011-07-02 23:40:04 +0000
@@ -1539,7 +1539,18 @@
message_with_string ("%s is undefined", keys, 0);
KVAR (current_kboard, defining_kbd_macro) = Qnil;
update_mode_lines = 1;
- KVAR (current_kboard, Vprefix_arg) = Qnil;
+ /* If this is a down-mouse event, don't reset prefix-arg;
+ pass it to the command run by the up event. */
+ if (EVENT_HAS_PARAMETERS (last_command_event))
+ {
+ Lisp_Object breakdown
+ = parse_modifiers (EVENT_HEAD (last_command_event));
+ int modifiers = XINT (XCAR (XCDR (breakdown)));
+ if (!(modifiers & down_modifier))
+ KVAR (current_kboard, Vprefix_arg) = Qnil;
+ }
+ else
+ KVAR (current_kboard, Vprefix_arg) = Qnil;
}
else
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r104891: Fix corner case in prefix-arg handling for mouse events (Bug#1586).,
Chong Yidong <=