From: Stefan Monnier Date: Wed, 30 Apr 2003 21:04:13 +0000 (+0000) Subject: (parse_modifiers_uncached): Parse `down', `drag', X-Git-Tag: ttn-vms-21-2-B4~10371 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=65470b5257ab64fe936fabd545446e4306c0a3ef;p=emacs.git (parse_modifiers_uncached): Parse `down', `drag', `double', and `triple' modifiers as well. --- diff --git a/src/keyboard.c b/src/keyboard.c index e2e61d25798..70c9d90530d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5844,6 +5844,26 @@ parse_modifiers_uncached (symbol, modifier_end) 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. */