comparison src/keymap.c @ 371:cc15677e0335 r21-2b1

Import from CVS: tag r21-2b1
author cvs
date Mon, 13 Aug 2007 11:03:08 +0200
parents a4f53d9b3154
children 6240c7796c7a
comparison
equal deleted inserted replaced
370:bd866891f083 371:cc15677e0335
1547 1547
1548 int 1548 int
1549 event_matches_key_specifier_p (struct Lisp_Event *event, 1549 event_matches_key_specifier_p (struct Lisp_Event *event,
1550 Lisp_Object key_specifier) 1550 Lisp_Object key_specifier)
1551 { 1551 {
1552 Lisp_Object event2 = Qnil; 1552 Lisp_Object event2;
1553 int retval; 1553 int retval;
1554 struct gcpro gcpro1; 1554 struct gcpro gcpro1;
1555 1555
1556 if (event->event_type != key_press_event || NILP (key_specifier) || 1556 if (event->event_type != key_press_event || NILP (key_specifier) ||
1557 (INTP (key_specifier) && !CHAR_INTP (key_specifier))) 1557 (INTP (key_specifier) && !CHAR_INTP (key_specifier)))
2224 Does all manner of semi-hairy heuristics, like looking in the current 2224 Does all manner of semi-hairy heuristics, like looking in the current
2225 buffer's map before looking in the global map and looking in the local 2225 buffer's map before looking in the global map and looking in the local
2226 map of the buffer in which the mouse was clicked in event0 is a click. 2226 map of the buffer in which the mouse was clicked in event0 is a click.
2227 2227
2228 It would be kind of nice if this were in Lisp so that this semi-hairy 2228 It would be kind of nice if this were in Lisp so that this semi-hairy
2229 semi-heuristic command-lookup behavior could be readily understood and 2229 semi-heuristic command-lookup behaviour could be readily understood and
2230 customised. However, this needs to be pretty fast, or performance of 2230 customised. However, this needs to be pretty fast, or performance of
2231 keyboard macros goes to shit; putting this in lisp slows macros down 2231 keyboard macros goes to shit; putting this in lisp slows macros down
2232 2-3x. And they're already slower than v18 by 5-6x. 2232 2-3x. And they're already slower than v18 by 5-6x.
2233 */ 2233 */
2234 2234
4323 DEFVAR_LISP ("key-translation-map", &Vkey_translation_map /* 4323 DEFVAR_LISP ("key-translation-map", &Vkey_translation_map /*
4324 Keymap of key translations that can override keymaps. 4324 Keymap of key translations that can override keymaps.
4325 This keymap works like `function-key-map', but comes after that, 4325 This keymap works like `function-key-map', but comes after that,
4326 and applies even for keys that have ordinary bindings. 4326 and applies even for keys that have ordinary bindings.
4327 */ ); 4327 */ );
4328 Vkey_translation_map = Qnil;
4329 4328
4330 DEFVAR_LISP ("vertical-divider-map", &Vvertical_divider_map /* 4329 DEFVAR_LISP ("vertical-divider-map", &Vvertical_divider_map /*
4331 Keymap which handles mouse clicks over vertical dividers. 4330 Keymap which handles mouse clicks over vertical dividers.
4332 */ ); 4331 */ );
4333 Vvertical_divider_map = Qnil;
4334 4332
4335 DEFVAR_INT ("keymap-tick", &keymap_tick /* 4333 DEFVAR_INT ("keymap-tick", &keymap_tick /*
4336 Incremented for each change to any keymap. 4334 Incremented for each change to any keymap.
4337 */ ); 4335 */ );
4338 keymap_tick = 0; 4336 keymap_tick = 0;