diff options
| author | Karoly Lorentey | 2005-06-25 16:34:30 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-06-25 16:34:30 +0000 |
| commit | f01b6d17cc07655d6ce62a4ac5097947529b81a2 (patch) | |
| tree | 564750204b28a321fcfaf196c5316f482f5ad5d9 /src/keymap.c | |
| parent | 0d0358be7e741898e363d02dbff01b35c662413c (diff) | |
| download | emacs-f01b6d17cc07655d6ce62a4ac5097947529b81a2.tar.gz emacs-f01b6d17cc07655d6ce62a4ac5097947529b81a2.zip | |
Make function-key-map a terminal-local variable (move it inside the kboard struct).
* src/keyboard.h (kboard): Move Vfunction_key_map inside the kboard struct.
* src/keyboard.c (Vfunction_key_map): Remove declaration.
(read_key_sequence, init_kboard): Update references to Vfunction_key_map.
(syms_of_keyboard): Declare function-key-map as a terminal-local variable.
(mark_kboards): Mark Vfunction_key_map.
* src/keymap.c (Vfunction_key_map): Remove.
(Fdescribe_buffer_bindings): Update references to Vfunction_key_map.
(syms_of_keymap): Remove DEFVAR for Vfunction_key_map.
* src/term.c (term_get_fkeys_1): Update references to Vfunction_key_map.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-355
Diffstat (limited to 'src/keymap.c')
| -rw-r--r-- | src/keymap.c | 31 |
1 files changed, 2 insertions, 29 deletions
diff --git a/src/keymap.c b/src/keymap.c index 3706ad52c9e..1734ac1baa9 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -79,11 +79,6 @@ Lisp_Object Vminor_mode_overriding_map_alist; | |||
| 79 | /* List of emulation mode keymap alists. */ | 79 | /* List of emulation mode keymap alists. */ |
| 80 | Lisp_Object Vemulation_mode_map_alists; | 80 | Lisp_Object Vemulation_mode_map_alists; |
| 81 | 81 | ||
| 82 | /* Keymap mapping ASCII function key sequences onto their preferred forms. | ||
| 83 | Initialized by the terminal-specific lisp files. See DEFVAR for more | ||
| 84 | documentation. */ | ||
| 85 | Lisp_Object Vfunction_key_map; | ||
| 86 | |||
| 87 | /* Keymap mapping ASCII function key sequences onto their preferred forms. */ | 82 | /* Keymap mapping ASCII function key sequences onto their preferred forms. */ |
| 88 | Lisp_Object Vkey_translation_map; | 83 | Lisp_Object Vkey_translation_map; |
| 89 | 84 | ||
| @@ -2939,8 +2934,8 @@ You type Translation\n\ | |||
| 2939 | "\f\nGlobal Bindings", nomenu, 0, 1, 0); | 2934 | "\f\nGlobal Bindings", nomenu, 0, 1, 0); |
| 2940 | 2935 | ||
| 2941 | /* Print the function-key-map translations under this prefix. */ | 2936 | /* Print the function-key-map translations under this prefix. */ |
| 2942 | if (!NILP (Vfunction_key_map)) | 2937 | if (!NILP (current_kboard->Vfunction_key_map)) |
| 2943 | describe_map_tree (Vfunction_key_map, 0, Qnil, prefix, | 2938 | describe_map_tree (current_kboard->Vfunction_key_map, 0, Qnil, prefix, |
| 2944 | "\f\nFunction key map translations", nomenu, 1, 0, 0); | 2939 | "\f\nFunction key map translations", nomenu, 1, 0, 0); |
| 2945 | 2940 | ||
| 2946 | UNGCPRO; | 2941 | UNGCPRO; |
| @@ -3802,28 +3797,6 @@ the same way. The "active" keymaps in each alist are used before | |||
| 3802 | `minor-mode-map-alist' and `minor-mode-overriding-map-alist'. */); | 3797 | `minor-mode-map-alist' and `minor-mode-overriding-map-alist'. */); |
| 3803 | Vemulation_mode_map_alists = Qnil; | 3798 | Vemulation_mode_map_alists = Qnil; |
| 3804 | 3799 | ||
| 3805 | |||
| 3806 | DEFVAR_LISP ("function-key-map", &Vfunction_key_map, | ||
| 3807 | doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. | ||
| 3808 | This allows Emacs to recognize function keys sent from ASCII | ||
| 3809 | terminals at any point in a key sequence. | ||
| 3810 | |||
| 3811 | The `read-key-sequence' function replaces any subsequence bound by | ||
| 3812 | `function-key-map' with its binding. More precisely, when the active | ||
| 3813 | keymaps have no binding for the current key sequence but | ||
| 3814 | `function-key-map' binds a suffix of the sequence to a vector or string, | ||
| 3815 | `read-key-sequence' replaces the matching suffix with its binding, and | ||
| 3816 | continues with the new sequence. | ||
| 3817 | |||
| 3818 | The events that come from bindings in `function-key-map' are not | ||
| 3819 | themselves looked up in `function-key-map'. | ||
| 3820 | |||
| 3821 | For example, suppose `function-key-map' binds `ESC O P' to [f1]. | ||
| 3822 | Typing `ESC O P' to `read-key-sequence' would return [f1]. Typing | ||
| 3823 | `C-x ESC O P' would return [?\\C-x f1]. If [f1] were a prefix | ||
| 3824 | key, typing `ESC O P x' would return [f1 x]. */); | ||
| 3825 | Vfunction_key_map = Fmake_sparse_keymap (Qnil); | ||
| 3826 | |||
| 3827 | DEFVAR_LISP ("key-translation-map", &Vkey_translation_map, | 3800 | DEFVAR_LISP ("key-translation-map", &Vkey_translation_map, |
| 3828 | doc: /* Keymap of key translations that can override keymaps. | 3801 | doc: /* Keymap of key translations that can override keymaps. |
| 3829 | This keymap works like `function-key-map', but comes after that, | 3802 | This keymap works like `function-key-map', but comes after that, |