Mercurial > emacs
comparison src/keyboard.c @ 50758:ee55f23e4fbc
(parse_modifiers_uncached): Parse `down', `drag',
`double', and `triple' modifiers as well.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Wed, 30 Apr 2003 21:04:13 +0000 |
parents | d4d06920c3ed |
children | 6e0a15287761 |
comparison
equal
deleted
inserted
replaced
50757:89533dc3e837 | 50758:ee55f23e4fbc |
---|---|
5842 case 's': | 5842 case 's': |
5843 SINGLE_LETTER_MOD (super_modifier); | 5843 SINGLE_LETTER_MOD (super_modifier); |
5844 break; | 5844 break; |
5845 | 5845 |
5846 #undef SINGLE_LETTER_MOD | 5846 #undef SINGLE_LETTER_MOD |
5847 | |
5848 #define MULTI_LETTER_MOD(BIT, NAME, LEN) \ | |
5849 if (i + LEN + 1 <= SBYTES (name) \ | |
5850 && ! strncmp (SDATA (name) + i, NAME, LEN)) \ | |
5851 { \ | |
5852 this_mod_end = i + LEN; \ | |
5853 this_mod = BIT; \ | |
5854 } | |
5855 | |
5856 case 'd': | |
5857 MULTI_LETTER_MOD (drag_modifier, "drag", 4); | |
5858 MULTI_LETTER_MOD (down_modifier, "down", 4); | |
5859 MULTI_LETTER_MOD (double_modifier, "double", 6); | |
5860 break; | |
5861 | |
5862 case 't': | |
5863 MULTI_LETTER_MOD (triple_modifier, "triple", 6); | |
5864 break; | |
5865 #undef MULTI_LETTER_MOD | |
5866 | |
5847 } | 5867 } |
5848 | 5868 |
5849 /* If we found no modifier, stop looking for them. */ | 5869 /* If we found no modifier, stop looking for them. */ |
5850 if (this_mod_end == 0) | 5870 if (this_mod_end == 0) |
5851 break; | 5871 break; |