# HG changeset patch # User Stefan Monnier # Date 1051736653 0 # Node ID ee55f23e4fbcc0abb6ed74fb965a4c0d1d33f154 # Parent 89533dc3e83775542fd7850a4b5254eaa013b635 (parse_modifiers_uncached): Parse `down', `drag', `double', and `triple' modifiers as well. diff -r 89533dc3e837 -r ee55f23e4fbc src/keyboard.c --- a/src/keyboard.c Wed Apr 30 21:01:05 2003 +0000 +++ b/src/keyboard.c Wed Apr 30 21:04:13 2003 +0000 @@ -5844,6 +5844,26 @@ break; #undef SINGLE_LETTER_MOD + +#define MULTI_LETTER_MOD(BIT, NAME, LEN) \ + if (i + LEN + 1 <= SBYTES (name) \ + && ! strncmp (SDATA (name) + i, NAME, LEN)) \ + { \ + this_mod_end = i + LEN; \ + this_mod = BIT; \ + } + + case 'd': + MULTI_LETTER_MOD (drag_modifier, "drag", 4); + MULTI_LETTER_MOD (down_modifier, "down", 4); + MULTI_LETTER_MOD (double_modifier, "double", 6); + break; + + case 't': + MULTI_LETTER_MOD (triple_modifier, "triple", 6); + break; +#undef MULTI_LETTER_MOD + } /* If we found no modifier, stop looking for them. */