comparison src/keyboard.c @ 85106:fd282fb888de

Add new `input-decode-map' keymap and use it for temrinal escape sequences. * keyboard.h (struct kboard): Add Vinput_decode_map. Remove Vlocal_key_translation_map. * keyboard.c (read_key_sequence): Add support for input-decode-map. (init_kboard): Init input-decode-map. Replace local-key-translation-map back with key-translation-map. (syms_of_keyboard): Declare input-decode-map. Remove local-key-translation-map. Update docstrings. (mark_kboards): Mark Vinput_decode_map. Don't mark Vlocal_key_translation_map. * keymap.c (Fdescribe_buffer_bindings): Describe input-decode-map. Replace local-key-translation-map back with key-translation-map. * term.c (term_get_fkeys_1, CONDITIONAL_REASSIGN): Bind in input-decode-map rather than function-key-map.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Tue, 09 Oct 2007 05:05:39 +0000
parents 4ed0cd5e3dee
children 5039706521c9
comparison
equal deleted inserted replaced
85105:ba4f1a829f83 85106:fd282fb888de
443 Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; 443 Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal;
444 444
445 /* Parent keymap of terminal-local function-key-map instances. */ 445 /* Parent keymap of terminal-local function-key-map instances. */
446 Lisp_Object Vfunction_key_map; 446 Lisp_Object Vfunction_key_map;
447 447
448 /* Parent keymap of terminal-local key-translation-map instances. */ 448 /* Keymap of key translations that can override keymaps. */
449 Lisp_Object Vkey_translation_map; 449 Lisp_Object Vkey_translation_map;
450 450
451 /* List of deferred actions to be performed at a later time. 451 /* List of deferred actions to be performed at a later time.
452 The precise format isn't relevant here; we just check whether it is nil. */ 452 The precise format isn't relevant here; we just check whether it is nil. */
453 Lisp_Object Vdeferred_action_list; 453 Lisp_Object Vdeferred_action_list;
9129 should hold off until t reaches them. We do this when we've just 9129 should hold off until t reaches them. We do this when we've just
9130 recognized a function key, to avoid searching for the function 9130 recognized a function key, to avoid searching for the function
9131 key's again in Vfunction_key_map. */ 9131 key's again in Vfunction_key_map. */
9132 volatile keyremap fkey; 9132 volatile keyremap fkey;
9133 9133
9134 /* Likewise, for key_translation_map. */ 9134 /* Likewise, for key_translation_map and input-decode-map. */
9135 volatile keyremap keytran; 9135 volatile keyremap keytran, indec;
9136 9136
9137 /* If we receive a `switch-frame' or `select-window' event in the middle of 9137 /* If we receive a `switch-frame' or `select-window' event in the middle of
9138 a key sequence, we put it off for later. 9138 a key sequence, we put it off for later.
9139 While we're reading, we keep the event here. */ 9139 While we're reading, we keep the event here. */
9140 volatile Lisp_Object delayed_switch_frame; 9140 volatile Lisp_Object delayed_switch_frame;
9207 keybuf[0..mock_input] holds the sequence we should reread. */ 9207 keybuf[0..mock_input] holds the sequence we should reread. */
9208 replay_sequence: 9208 replay_sequence:
9209 9209
9210 /* We may switch keyboards between rescans, so we need to 9210 /* We may switch keyboards between rescans, so we need to
9211 reinitialize fkey and keytran before each replay. */ 9211 reinitialize fkey and keytran before each replay. */
9212 indec.map = indec.parent = current_kboard->Vinput_decode_map;
9212 fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map; 9213 fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map;
9213 keytran.map = keytran.parent = current_kboard->Vlocal_key_translation_map; 9214 keytran.map = keytran.parent = Vkey_translation_map;
9215 indec.start = indec.end = 0;
9214 fkey.start = fkey.end = 0; 9216 fkey.start = fkey.end = 0;
9215 keytran.start = keytran.end = 0; 9217 keytran.start = keytran.end = 0;
9216 9218
9217 starting_buffer = current_buffer; 9219 starting_buffer = current_buffer;
9218 first_unbound = bufsize + 1; 9220 first_unbound = bufsize + 1;
9297 /* Don't return in the middle of a possible function key sequence, 9299 /* Don't return in the middle of a possible function key sequence,
9298 if the only bindings we found were via case conversion. 9300 if the only bindings we found were via case conversion.
9299 Thus, if ESC O a has a function-key-map translation 9301 Thus, if ESC O a has a function-key-map translation
9300 and ESC o has a binding, don't return after ESC O, 9302 and ESC o has a binding, don't return after ESC O,
9301 so that we can translate ESC O plus the next character. */ 9303 so that we can translate ESC O plus the next character. */
9302 : (fkey.start < t || keytran.start < t)) 9304 : (/* indec.start < t || fkey.start < t || */ keytran.start < t))
9303 { 9305 {
9304 Lisp_Object key; 9306 Lisp_Object key;
9305 int used_mouse_menu = 0; 9307 int used_mouse_menu = 0;
9306 9308
9307 /* Where the last real key started. If we need to throw away a 9309 /* Where the last real key started. If we need to throw away a
9315 while those allow us to restart the entire key sequence, 9317 while those allow us to restart the entire key sequence,
9316 echo_local_start and keys_local_start allow us to throw away 9318 echo_local_start and keys_local_start allow us to throw away
9317 just one key. */ 9319 just one key. */
9318 volatile int echo_local_start, keys_local_start, local_first_binding; 9320 volatile int echo_local_start, keys_local_start, local_first_binding;
9319 9321
9320 eassert (fkey.end == t || (fkey.end > t && fkey.end <= mock_input)); 9322 eassert (indec.end == t || (indec.end > t && indec.end <= mock_input));
9323 eassert (indec.start <= indec.end);
9321 eassert (fkey.start <= fkey.end); 9324 eassert (fkey.start <= fkey.end);
9322 eassert (keytran.start <= keytran.end); 9325 eassert (keytran.start <= keytran.end);
9323 /* key-translation-map is applied *after* function-key-map. */ 9326 /* key-translation-map is applied *after* function-key-map
9327 which is itself applied *after* input-decode-map. */
9328 eassert (fkey.end <= indec.start);
9324 eassert (keytran.end <= fkey.start); 9329 eassert (keytran.end <= fkey.start);
9325 9330
9326 if (first_unbound < fkey.start && first_unbound < keytran.start) 9331 if (/* first_unbound < indec.start && first_unbound < fkey.start && */
9332 first_unbound < keytran.start)
9327 { /* The prefix upto first_unbound has no binding and has 9333 { /* The prefix upto first_unbound has no binding and has
9328 no translation left to do either, so we know it's unbound. 9334 no translation left to do either, so we know it's unbound.
9329 If we don't stop now, we risk staying here indefinitely 9335 If we don't stop now, we risk staying here indefinitely
9330 (if the user keeps entering fkey or keytran prefixes 9336 (if the user keeps entering fkey or keytran prefixes
9331 like C-c ESC ESC ESC ESC ...) */ 9337 like C-c ESC ESC ESC ESC ...) */
9332 int i; 9338 int i;
9333 for (i = first_unbound + 1; i < t; i++) 9339 for (i = first_unbound + 1; i < t; i++)
9334 keybuf[i - first_unbound - 1] = keybuf[i]; 9340 keybuf[i - first_unbound - 1] = keybuf[i];
9335 mock_input = t - first_unbound - 1; 9341 mock_input = t - first_unbound - 1;
9342 indec.end = indec.start -= first_unbound + 1;
9343 indec.map = indec.parent;
9336 fkey.end = fkey.start -= first_unbound + 1; 9344 fkey.end = fkey.start -= first_unbound + 1;
9337 fkey.map = fkey.parent; 9345 fkey.map = fkey.parent;
9338 keytran.end = keytran.start -= first_unbound + 1; 9346 keytran.end = keytran.start -= first_unbound + 1;
9339 keytran.map = keytran.parent; 9347 keytran.map = keytran.parent;
9340 goto replay_sequence; 9348 goto replay_sequence;
9756 /* If KEY wasn't bound, we'll try some fallbacks. */ 9764 /* If KEY wasn't bound, we'll try some fallbacks. */
9757 if (first_binding < nmaps) 9765 if (first_binding < nmaps)
9758 /* This is needed for the following scenario: 9766 /* This is needed for the following scenario:
9759 event 0: a down-event that gets dropped by calling replay_key. 9767 event 0: a down-event that gets dropped by calling replay_key.
9760 event 1: some normal prefix like C-h. 9768 event 1: some normal prefix like C-h.
9761 After event 0, first_unbound is 0, after event 1 fkey.start 9769 After event 0, first_unbound is 0, after event 1 indec.start,
9762 and keytran.start are both 1, so when we see that C-h is bound, 9770 fkey.start, and keytran.start are all 1, so when we see that
9763 we need to update first_unbound. */ 9771 C-h is bound, we need to update first_unbound. */
9764 first_unbound = max (t + 1, first_unbound); 9772 first_unbound = max (t + 1, first_unbound);
9765 else 9773 else
9766 { 9774 {
9767 Lisp_Object head; 9775 Lisp_Object head;
9768 9776
9769 /* Remember the position to put an upper bound on fkey.start. */ 9777 /* Remember the position to put an upper bound on indec.start. */
9770 first_unbound = min (t, first_unbound); 9778 first_unbound = min (t, first_unbound);
9771 9779
9772 head = EVENT_HEAD (key); 9780 head = EVENT_HEAD (key);
9773 if (help_char_p (head) && t > 0) 9781 if (help_char_p (head) && t > 0)
9774 { 9782 {
9849 Isn't this just the most wonderful code ever? */ 9857 Isn't this just the most wonderful code ever? */
9850 9858
9851 /* If mock_input > t + 1, the above simplification 9859 /* If mock_input > t + 1, the above simplification
9852 will actually end up dropping keys on the floor. 9860 will actually end up dropping keys on the floor.
9853 This is probably OK for now, but even 9861 This is probably OK for now, but even
9854 if mock_input <= t + 1, we need to adjust fkey 9862 if mock_input <= t + 1, we need to adjust indec,
9855 and keytran. 9863 fkey, and keytran.
9856 Typical case [header-line down-mouse-N]: 9864 Typical case [header-line down-mouse-N]:
9857 mock_input = 2, t = 1, fkey.end = 1, 9865 mock_input = 2, t = 1, fkey.end = 1,
9858 last_real_key_start = 0. */ 9866 last_real_key_start = 0. */
9859 if (fkey.end > last_real_key_start) 9867 if (indec.end > last_real_key_start)
9860 { 9868 {
9861 fkey.end = fkey.start 9869 indec.end = indec.start
9862 = min (last_real_key_start, fkey.start); 9870 = min (last_real_key_start, indec.start);
9863 fkey.map = fkey.parent; 9871 indec.map = indec.parent;
9864 if (keytran.end > last_real_key_start) 9872 if (fkey.end > last_real_key_start)
9865 { 9873 {
9866 keytran.end = keytran.start 9874 fkey.end = fkey.start
9867 = min (last_real_key_start, keytran.start); 9875 = min (last_real_key_start, fkey.start);
9868 keytran.map = keytran.parent; 9876 fkey.map = fkey.parent;
9877 if (keytran.end > last_real_key_start)
9878 {
9879 keytran.end = keytran.start
9880 = min (last_real_key_start, keytran.start);
9881 keytran.map = keytran.parent;
9882 }
9869 } 9883 }
9870 } 9884 }
9871 if (t == last_real_key_start) 9885 if (t == last_real_key_start)
9872 { 9886 {
9873 mock_input = 0; 9887 mock_input = 0;
9917 last_nonmenu_event = key; 9931 last_nonmenu_event = key;
9918 9932
9919 /* Record what part of this_command_keys is the current key sequence. */ 9933 /* Record what part of this_command_keys is the current key sequence. */
9920 this_single_command_key_start = this_command_key_count - t; 9934 this_single_command_key_start = this_command_key_count - t;
9921 9935
9922 if (first_binding < nmaps && NILP (submaps[first_binding])) 9936 /* Look for this sequence in input-decode-map.
9937 Scan from indec.end until we find a bound suffix. */
9938 while (indec.end < t)
9939 {
9940 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
9941 int done, diff;
9942
9943 GCPRO4 (indec.map, fkey.map, keytran.map, delayed_switch_frame);
9944 done = keyremap_step (keybuf, bufsize, &indec, max (t, mock_input),
9945 1, &diff, prompt);
9946 UNGCPRO;
9947 if (done)
9948 {
9949 mock_input = diff + max (t, mock_input);
9950 goto replay_sequence;
9951 }
9952 }
9953
9954 if (first_binding < nmaps && NILP (submaps[first_binding])
9955 && indec.start >= t)
9923 /* There is a binding and it's not a prefix. 9956 /* There is a binding and it's not a prefix.
9957 (and it doesn't have any input-decode-map translation pending).
9924 There is thus no function-key in this sequence. 9958 There is thus no function-key in this sequence.
9925 Moving fkey.start is important in this case to allow keytran.start 9959 Moving fkey.start is important in this case to allow keytran.start
9926 to go over the sequence before we return (since we keep the 9960 to go over the sequence before we return (since we keep the
9927 invariant that keytran.end <= fkey.start). */ 9961 invariant that keytran.end <= fkey.start). */
9928 { 9962 {
9931 } 9965 }
9932 else 9966 else
9933 /* If the sequence is unbound, see if we can hang a function key 9967 /* If the sequence is unbound, see if we can hang a function key
9934 off the end of it. */ 9968 off the end of it. */
9935 /* Continue scan from fkey.end until we find a bound suffix. */ 9969 /* Continue scan from fkey.end until we find a bound suffix. */
9936 while (fkey.end < t) 9970 while (fkey.end < indec.start)
9937 { 9971 {
9938 struct gcpro gcpro1, gcpro2, gcpro3; 9972 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
9939 int done, diff; 9973 int done, diff;
9940 9974
9941 GCPRO3 (fkey.map, keytran.map, delayed_switch_frame); 9975 GCPRO4 (indec.map, fkey.map, keytran.map, delayed_switch_frame);
9942 done = keyremap_step (keybuf, bufsize, &fkey, 9976 done = keyremap_step (keybuf, bufsize, &fkey,
9943 max (t, mock_input), 9977 max (t, mock_input),
9944 /* If there's a binding (i.e. 9978 /* If there's a binding (i.e.
9945 first_binding >= nmaps) we don't want 9979 first_binding >= nmaps) we don't want
9946 to apply this function-key-mapping. */ 9980 to apply this function-key-mapping. */
9948 &diff, prompt); 9982 &diff, prompt);
9949 UNGCPRO; 9983 UNGCPRO;
9950 if (done) 9984 if (done)
9951 { 9985 {
9952 mock_input = diff + max (t, mock_input); 9986 mock_input = diff + max (t, mock_input);
9987 /* Adjust the input-decode-map counters. */
9988 indec.end += diff;
9989 indec.start += diff;
9990
9953 goto replay_sequence; 9991 goto replay_sequence;
9954 } 9992 }
9955 } 9993 }
9956 9994
9957 /* Look for this sequence in key-translation-map. 9995 /* Look for this sequence in key-translation-map.
9958 Scan from keytran.end until we find a bound suffix. */ 9996 Scan from keytran.end until we find a bound suffix. */
9959 while (keytran.end < fkey.start) 9997 while (keytran.end < fkey.start)
9960 { 9998 {
9961 struct gcpro gcpro1, gcpro2, gcpro3; 9999 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
9962 int done, diff; 10000 int done, diff;
9963 10001
9964 GCPRO3 (fkey.map, keytran.map, delayed_switch_frame); 10002 GCPRO4 (indec.map, fkey.map, keytran.map, delayed_switch_frame);
9965 done = keyremap_step (keybuf, bufsize, &keytran, max (t, mock_input), 10003 done = keyremap_step (keybuf, bufsize, &keytran, max (t, mock_input),
9966 1, &diff, prompt); 10004 1, &diff, prompt);
9967 UNGCPRO; 10005 UNGCPRO;
9968 if (done) 10006 if (done)
9969 { 10007 {
9970 mock_input = diff + max (t, mock_input); 10008 mock_input = diff + max (t, mock_input);
9971 /* Adjust the function-key-map counters. */ 10009 /* Adjust the function-key-map and input-decode-map counters. */
10010 indec.end += diff;
10011 indec.start += diff;
9972 fkey.end += diff; 10012 fkey.end += diff;
9973 fkey.start += diff; 10013 fkey.start += diff;
9974 10014
9975 goto replay_sequence; 10015 goto replay_sequence;
9976 } 10016 }
9979 /* If KEY is not defined in any of the keymaps, 10019 /* If KEY is not defined in any of the keymaps,
9980 and cannot be part of a function key or translation, 10020 and cannot be part of a function key or translation,
9981 and is an upper case letter 10021 and is an upper case letter
9982 use the corresponding lower-case letter instead. */ 10022 use the corresponding lower-case letter instead. */
9983 if (first_binding >= nmaps 10023 if (first_binding >= nmaps
9984 && fkey.start >= t && keytran.start >= t 10024 && /* indec.start >= t && fkey.start >= t && */ keytran.start >= t
9985 && INTEGERP (key) 10025 && INTEGERP (key)
9986 && ((((XINT (key) & 0x3ffff) 10026 && ((((XINT (key) & 0x3ffff)
9987 < XCHAR_TABLE (current_buffer->downcase_table)->size) 10027 < XCHAR_TABLE (current_buffer->downcase_table)->size)
9988 && UPPERCASEP (XINT (key) & 0x3ffff)) 10028 && UPPERCASEP (XINT (key) & 0x3ffff))
9989 || (XINT (key) & shift_modifier))) 10029 || (XINT (key) & shift_modifier)))
10010 /* If KEY is not defined in any of the keymaps, 10050 /* If KEY is not defined in any of the keymaps,
10011 and cannot be part of a function key or translation, 10051 and cannot be part of a function key or translation,
10012 and is a shifted function key, 10052 and is a shifted function key,
10013 use the corresponding unshifted function key instead. */ 10053 use the corresponding unshifted function key instead. */
10014 if (first_binding >= nmaps 10054 if (first_binding >= nmaps
10015 && fkey.start >= t && keytran.start >= t 10055 && /* indec.start >= t && fkey.start >= t && */ keytran.start >= t
10016 && SYMBOLP (key)) 10056 && SYMBOLP (key))
10017 { 10057 {
10018 Lisp_Object breakdown; 10058 Lisp_Object breakdown;
10019 int modifiers; 10059 int modifiers;
10020 10060
10031 new_key = apply_modifiers (modifiers, 10071 new_key = apply_modifiers (modifiers,
10032 XCAR (breakdown)); 10072 XCAR (breakdown));
10033 10073
10034 keybuf[t - 1] = new_key; 10074 keybuf[t - 1] = new_key;
10035 mock_input = max (t, mock_input); 10075 mock_input = max (t, mock_input);
10036 fkey.start = fkey.end = 0;
10037 keytran.start = keytran.end = 0;
10038
10039 goto replay_sequence; 10076 goto replay_sequence;
10040 } 10077 }
10041 } 10078 }
10042 } 10079 }
10043 10080
11458 kb->defining_kbd_macro = Qnil; 11495 kb->defining_kbd_macro = Qnil;
11459 kb->Vlast_kbd_macro = Qnil; 11496 kb->Vlast_kbd_macro = Qnil;
11460 kb->reference_count = 0; 11497 kb->reference_count = 0;
11461 kb->Vsystem_key_alist = Qnil; 11498 kb->Vsystem_key_alist = Qnil;
11462 kb->system_key_syms = Qnil; 11499 kb->system_key_syms = Qnil;
11500 kb->Vinput_decode_map = Fmake_sparse_keymap (Qnil);
11463 kb->Vlocal_function_key_map = Fmake_sparse_keymap (Qnil); 11501 kb->Vlocal_function_key_map = Fmake_sparse_keymap (Qnil);
11464 Fset_keymap_parent (kb->Vlocal_function_key_map, Vfunction_key_map); 11502 Fset_keymap_parent (kb->Vlocal_function_key_map, Vfunction_key_map);
11465 kb->Vlocal_key_translation_map = Fmake_sparse_keymap (Qnil);
11466 Fset_keymap_parent (kb->Vlocal_key_translation_map, Vkey_translation_map);
11467 kb->Vdefault_minibuffer_frame = Qnil; 11503 kb->Vdefault_minibuffer_frame = Qnil;
11468 } 11504 }
11469 11505
11470 /* 11506 /*
11471 * Destroy the contents of a kboard object, but not the object itself. 11507 * Destroy the contents of a kboard object, but not the object itself.
12194 `system-key-alist' has a separate binding for each terminal device. 12230 `system-key-alist' has a separate binding for each terminal device.
12195 See Info node `(elisp)Multiple displays'. */); 12231 See Info node `(elisp)Multiple displays'. */);
12196 12232
12197 DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map, 12233 DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map,
12198 doc: /* Keymap that translates key sequences to key sequences during input. 12234 doc: /* Keymap that translates key sequences to key sequences during input.
12199 This is used mainly for mapping ASCII function key sequences into 12235 This is used mainly for mapping key sequences into some preferred
12200 real Emacs function key events (symbols). 12236 key events (symbols).
12201 12237
12202 The `read-key-sequence' function replaces any subsequence bound by 12238 The `read-key-sequence' function replaces any subsequence bound by
12203 `local-function-key-map' with its binding. More precisely, when the 12239 `local-function-key-map' with its binding. More precisely, when the
12204 active keymaps have no binding for the current key sequence but 12240 active keymaps have no binding for the current key sequence but
12205 `local-function-key-map' binds a suffix of the sequence to a vector or 12241 `local-function-key-map' binds a suffix of the sequence to a vector or
12220 `local-function-key-map' has a separate binding for each terminal 12256 `local-function-key-map' has a separate binding for each terminal
12221 device. See Info node `(elisp)Multiple displays'. If you need to 12257 device. See Info node `(elisp)Multiple displays'. If you need to
12222 define a binding on all terminals, change `function-key-map' 12258 define a binding on all terminals, change `function-key-map'
12223 instead. Initially, `local-function-key-map' is an empty keymap that 12259 instead. Initially, `local-function-key-map' is an empty keymap that
12224 has `function-key-map' as its parent on all terminal devices. */); 12260 has `function-key-map' as its parent on all terminal devices. */);
12261
12262 DEFVAR_KBOARD ("input-decode-map", Vinput_decode_map,
12263 doc: /* Keymap that decodes input escape sequences.
12264 This is used mainly for mapping ASCII function key sequences into
12265 real Emacs function key events (symbols).
12266
12267 The `read-key-sequence' function replaces any subsequence bound by
12268 `local-function-key-map' with its binding. Contrary to `function-key-map',
12269 this map applies its rebinding regardless of the presence of an ordinary
12270 binding. So it is more like `key-translation-map' except that it applies
12271 before `function-key-map' rather than after.
12272
12273 If the binding is a function, it is called with one argument (the prompt)
12274 and its return value (a key sequence) is used.
12275
12276 The events that come from bindings in `input-decode-map' are not
12277 themselves looked up in `input-decode-map'.
12278
12279 This variable is keyboard-local. */);
12225 12280
12226 DEFVAR_LISP ("function-key-map", &Vfunction_key_map, 12281 DEFVAR_LISP ("function-key-map", &Vfunction_key_map,
12227 doc: /* The parent keymap of all `local-function-key-map' instances. 12282 doc: /* The parent keymap of all `local-function-key-map' instances.
12228 Function key definitions that apply to all terminal devices should go 12283 Function key definitions that apply to all terminal devices should go
12229 here. If a mapping is defined in both the current 12284 here. If a mapping is defined in both the current
12230 `local-function-key-map' binding and this variable, then the local 12285 `local-function-key-map' binding and this variable, then the local
12231 definition will take precendence. */); 12286 definition will take precendence. */);
12232 Vfunction_key_map = Fmake_sparse_keymap (Qnil); 12287 Vfunction_key_map = Fmake_sparse_keymap (Qnil);
12233 12288
12234 DEFVAR_KBOARD ("local-key-translation-map", Vlocal_key_translation_map, 12289 DEFVAR_LISP ("key-translation-map", &Vkey_translation_map,
12235 doc: /* Keymap of key translations that can override keymaps. 12290 doc: /* Keymap of key translations that can override keymaps.
12236 This keymap works like `function-key-map', but comes after that, 12291 This keymap works like `function-key-map', but comes after that,
12237 and its non-prefix bindings override ordinary bindings. 12292 and its non-prefix bindings override ordinary bindings.
12238 12293 Another difference is that it is global rather than keyboard-local. */);
12239 `key-translation-map' has a separate binding for each terminal device.
12240 (See Info node `(elisp)Multiple displays'.) If you need to set a key
12241 translation on all terminals, change `global-key-translation-map' instead. */);
12242
12243 DEFVAR_LISP ("key-translation-map", &Vkey_translation_map,
12244 doc: /* The parent keymap of all `local-key-translation-map' instances.
12245 Key translations that apply to all terminal devices should go here. */);
12246 Vkey_translation_map = Fmake_sparse_keymap (Qnil); 12294 Vkey_translation_map = Fmake_sparse_keymap (Qnil);
12247 12295
12248 DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list, 12296 DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list,
12249 doc: /* List of deferred actions to be performed at a later time. 12297 doc: /* List of deferred actions to be performed at a later time.
12250 The precise format isn't relevant here; we just check whether it is nil. */); 12298 The precise format isn't relevant here; we just check whether it is nil. */);
12418 mark_object (kb->kbd_queue); 12466 mark_object (kb->kbd_queue);
12419 mark_object (kb->defining_kbd_macro); 12467 mark_object (kb->defining_kbd_macro);
12420 mark_object (kb->Vlast_kbd_macro); 12468 mark_object (kb->Vlast_kbd_macro);
12421 mark_object (kb->Vsystem_key_alist); 12469 mark_object (kb->Vsystem_key_alist);
12422 mark_object (kb->system_key_syms); 12470 mark_object (kb->system_key_syms);
12471 mark_object (kb->Vinput_decode_map);
12423 mark_object (kb->Vlocal_function_key_map); 12472 mark_object (kb->Vlocal_function_key_map);
12424 mark_object (kb->Vlocal_key_translation_map);
12425 mark_object (kb->Vdefault_minibuffer_frame); 12473 mark_object (kb->Vdefault_minibuffer_frame);
12426 mark_object (kb->echo_string); 12474 mark_object (kb->echo_string);
12427 } 12475 }
12428 { 12476 {
12429 struct input_event *event; 12477 struct input_event *event;