comparison src/keymap.c @ 284:558f606b08ae r21-0b40

Import from CVS: tag r21-0b40
author cvs
date Mon, 13 Aug 2007 10:34:13 +0200
parents c42ec1d1cded
children 9ea74add5d37
comparison
equal deleted inserted replaced
283:fa3d41851a08 284:558f606b08ae
205 static Lisp_Object Qminor_mode_map_alist; 205 static Lisp_Object Qminor_mode_map_alist;
206 206
207 static Lisp_Object Voverriding_local_map; 207 static Lisp_Object Voverriding_local_map;
208 208
209 static Lisp_Object Vkey_translation_map; 209 static Lisp_Object Vkey_translation_map;
210
211 static Lisp_Object Vvertical_divider_map;
210 212
211 /* This is incremented whenever a change is made to a keymap. This is 213 /* This is incremented whenever a change is made to a keymap. This is
212 so that things which care (such as the menubar code) can recompute 214 so that things which care (such as the menubar code) can recompute
213 privately-cached data when the user has changed keybindings. 215 privately-cached data when the user has changed keybindings.
214 */ 216 */
2330 } 2332 }
2331 #ifdef HAVE_WINDOW_SYSTEM 2333 #ifdef HAVE_WINDOW_SYSTEM
2332 else 2334 else
2333 { 2335 {
2334 /* It's a mouse event; order of keymaps searched is: 2336 /* It's a mouse event; order of keymaps searched is:
2337 o vertical-divider-map, if event is over a divider
2335 o local-map of mouse-grabbed-buffer 2338 o local-map of mouse-grabbed-buffer
2336 o keymap of any/all extents under the mouse 2339 o keymap of any/all extents under the mouse
2337 if the mouse is over a modeline: 2340 if the mouse is over a modeline:
2338 o modeline-map of buffer corresponding to that modeline 2341 o modeline-map of buffer corresponding to that modeline
2339 o else, local-map of buffer under the mouse 2342 o else, local-map of buffer under the mouse
2340 o minor-mode maps 2343 o minor-mode maps
2341 o local-map of current-buffer 2344 o local-map of current-buffer
2342 o global-map 2345 o global-map
2343 */ 2346 */
2344 Lisp_Object window = Fevent_window (terminal); 2347 Lisp_Object window = Fevent_window (terminal);
2348
2349 if (!NILP (Fevent_over_vertical_divider_p (terminal)))
2350 {
2351 if (KEYMAPP (Vvertical_divider_map))
2352 relevant_map_push (Vvertical_divider_map, &closure);
2353 }
2345 2354
2346 if (BUFFERP (Vmouse_grabbed_buffer)) 2355 if (BUFFERP (Vmouse_grabbed_buffer))
2347 { 2356 {
2348 Lisp_Object map = XBUFFER (Vmouse_grabbed_buffer)->keymap; 2357 Lisp_Object map = XBUFFER (Vmouse_grabbed_buffer)->keymap;
2349 2358
2533 - the current-local-map of the current-buffer; 2542 - the current-local-map of the current-buffer;
2534 - the current global map. 2543 - the current global map.
2535 2544
2536 For mouse-clicks, the order of keymaps searched is: 2545 For mouse-clicks, the order of keymaps searched is:
2537 - the current-local-map of the `mouse-grabbed-buffer' if any; 2546 - the current-local-map of the `mouse-grabbed-buffer' if any;
2547 - vertical-divider-map, if the event happened over a vertical divider
2538 - the `keymap' property of any extent(s) at the position of the click 2548 - the `keymap' property of any extent(s) at the position of the click
2539 (this includes modeline extents); 2549 (this includes modeline extents);
2540 - the modeline-map of the buffer corresponding to the modeline under 2550 - the modeline-map of the buffer corresponding to the modeline under
2541 the mouse (if the click happened over a modeline); 2551 the mouse (if the click happened over a modeline);
2542 - the value of toolbar-map in the current-buffer (if the click 2552 - the value of toolbar-map in the current-buffer (if the click
4314 Keymap of key translations that can override keymaps. 4324 Keymap of key translations that can override keymaps.
4315 This keymap works like `function-key-map', but comes after that, 4325 This keymap works like `function-key-map', but comes after that,
4316 and applies even for keys that have ordinary bindings. 4326 and applies even for keys that have ordinary bindings.
4317 */ ); 4327 */ );
4318 4328
4329 DEFVAR_LISP ("vertical-divider-map", &Vvertical_divider_map /*
4330 Keymap which handles mouse clicks over vertical dividers.
4331 */ );
4332
4319 DEFVAR_INT ("keymap-tick", &keymap_tick /* 4333 DEFVAR_INT ("keymap-tick", &keymap_tick /*
4320 Incremented for each change to any keymap. 4334 Incremented for each change to any keymap.
4321 */ ); 4335 */ );
4322 keymap_tick = 0; 4336 keymap_tick = 0;
4323 4337