Mercurial > hg > xemacs-beta
comparison src/keymap.c @ 157:6b37e6ddd302 r20-3b5
Import from CVS: tag r20-3b5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:40:41 +0200 |
parents | 8619ce7e4c50 |
children | 28f395d8dc7a |
comparison
equal
deleted
inserted
replaced
156:60baf0b43294 | 157:6b37e6ddd302 |
---|---|
47 #undef MOD_ALT | 47 #undef MOD_ALT |
48 #undef MOD_CONTROL | 48 #undef MOD_CONTROL |
49 #undef MOD_SHIFT | 49 #undef MOD_SHIFT |
50 #endif | 50 #endif |
51 | 51 |
52 #include <events-mod.h> | 52 #include "events-mod.h" |
53 | 53 |
54 | 54 |
55 /* A keymap contains four slots: | 55 /* A keymap contains four slots: |
56 | 56 |
57 parents Ordered list of keymaps to search after | 57 parents Ordered list of keymaps to search after |
2415 search the keymaps associated with glyphs which may be physically | 2415 search the keymaps associated with glyphs which may be physically |
2416 disjoint from their extents: for example, if a glyph is out in the | 2416 disjoint from their extents: for example, if a glyph is out in the |
2417 margin, we should still consult the kemyap of that glyph's extent, | 2417 margin, we should still consult the kemyap of that glyph's extent, |
2418 which may not itself be under the mouse. | 2418 which may not itself be under the mouse. |
2419 */ | 2419 */ |
2420 | |
2421 extern Lisp_Object Fextent_in_region_p(Lisp_Object extent, | |
2422 Lisp_Object from, | |
2423 Lisp_Object to, | |
2424 Lisp_Object flags); | |
2425 | |
2420 static void | 2426 static void |
2421 get_relevant_extent_keymaps (Lisp_Object pos, Lisp_Object buffer_or_string, | 2427 get_relevant_extent_keymaps (Lisp_Object pos, Lisp_Object buffer_or_string, |
2422 Lisp_Object glyph, | 2428 Lisp_Object glyph, |
2423 struct relevant_maps *closure) | 2429 struct relevant_maps *closure) |
2424 { | 2430 { |
2434 | 2440 |
2435 /* Next check the extents at the text position, if any */ | 2441 /* Next check the extents at the text position, if any */ |
2436 if (!NILP (pos)) | 2442 if (!NILP (pos)) |
2437 { | 2443 { |
2438 Lisp_Object extent; | 2444 Lisp_Object extent; |
2439 for (extent = Fextent_at (pos, buffer_or_string, Qkeymap, Qnil, Qnil); | 2445 for (extent = Fextent_at (pos, buffer_or_string, Qkeymap, Qnil, Qat); |
2440 !NILP (extent); | 2446 !NILP (extent); |
2441 extent = Fextent_at (pos, buffer_or_string, Qkeymap, extent, Qnil)) | 2447 extent = Fextent_at (pos, buffer_or_string, Qkeymap, extent, Qat)) |
2442 { | 2448 { |
2443 Lisp_Object keymap = Fextent_property (extent, Qkeymap, Qnil); | 2449 if (!NILP (Fextent_in_region_p (extent, pos, pos, Qnil))) |
2444 if (!NILP (keymap)) | 2450 { |
2445 relevant_map_push (get_keymap (keymap, 1, 1), closure); | 2451 Lisp_Object keymap = Fextent_property (extent, Qkeymap, Qnil); |
2446 QUIT; | 2452 if (!NILP (keymap)) |
2453 relevant_map_push (get_keymap (keymap, 1, 1), closure); | |
2454 QUIT; | |
2455 } | |
2447 } | 2456 } |
2448 } | 2457 } |
2449 } | 2458 } |
2450 | 2459 |
2451 static Lisp_Object | 2460 static Lisp_Object |