diff options
| author | Karoly Lorentey | 2005-07-12 10:55:24 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2005-07-12 10:55:24 +0000 |
| commit | ac09dc1ec3f67a1a7a26411106480fea4e4d90b2 (patch) | |
| tree | e7cdbb75b89ab72dd49caeab6f30a7c4d315a8f3 /src | |
| parent | a9d63618b0fea2f1740d50736cbd37cc587aecb1 (diff) | |
| download | emacs-ac09dc1ec3f67a1a7a26411106480fea4e4d90b2.tar.gz emacs-ac09dc1ec3f67a1a7a26411106480fea4e4d90b2.zip | |
Rename function-key-map to local-function-key-map, and global-function-key-map to function-key-map. Same for key-translation-map.
* src/keyboard.h (struct kboard): Rename member 'Vfunction_key_map' to
'Vlocal_function_key_map', and 'Vkey_translation_map' to
'Vlocal_key_translation_map'.
(Vfunction_key_map, Vkey_translation_map): New declarations.
* src/keyboard.c (Vfunction_key_map): New variable.
(Vglobal_key_translation_map): Rename to Vglobal_key_translation_map.
(read_key_sequence, init_kboard, syms_of_keyboard, mark_kboards): Update.
* src/keymap.c (Fdescribe_buffer_bindings): Update.
* src/term.c (term_get_fkeys_1): Update.
* lisp/double.el (double-setup): Replace global-key-translation-map with key-translation-map.
* lisp/international/encoded-kb.el (encoded-kbd-setup-display): Ditto.
* lisp/international/iso-transl.el: Ditto.
* lisp/obsolete/iso-acc.el (iso-accents-customize): Ditto.
* lisp/edmacro.el (edmacro-format-keys): Use terminal-local binding of
local-function-key-map instead of function-key-map.
* lisp/emulation/cua-base.el (cua--pre-command-handler): Ditto.
* lisp/isearch.el (isearch-other-meta-char): Ditto.
* lisp/subr.el (read-quoted-char): Ditto.
* lisp/term/vt200.el: Ditto.
* lisp/term/vt201.el: Ditto.
* lisp/term/vt220.el: Ditto.
* lisp/term/vt240.el: Ditto.
* lisp/term/vt300.el: Ditto.
* lisp/term/vt320.el: Ditto.
* lisp/term/vt400.el: Ditto.
* lisp/term/vt420.el: Ditto.
* lisp/simple.el (normal-erase-is-backspace-mode): Add todo note.
* lisp/xt-mouse.el: Ditto.
* lisp/term/AT386.el: Adapt for renaming of function-key-map to local-function-key-map.
* lisp/term/internal.el: Ditto.
* lisp/term/iris-ansi.el: Ditto.
* lisp/term/lk201.el: Ditto.
* lisp/term/mac-win.el: Ditto.
* lisp/term/news.el: Ditto.
* lisp/term/rxvt.el: Ditto.
* lisp/term/sun.el: Ditto.
* lisp/term/tvi970.el: Ditto.
* lisp/term/wyse50.el: Ditto.
* lisp/term/x-win.el (x-setup-function-keys): Ditto.
* lisp/term/xterm.el: Ditto.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-386
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 43 | ||||
| -rw-r--r-- | src/keyboard.h | 9 | ||||
| -rw-r--r-- | src/keymap.c | 8 | ||||
| -rw-r--r-- | src/term.c | 14 |
4 files changed, 44 insertions, 30 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 7bdfa454636..d2d5919fc85 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -440,8 +440,11 @@ Lisp_Object Qpre_command_hook, Vpre_command_hook; | |||
| 440 | Lisp_Object Qpost_command_hook, Vpost_command_hook; | 440 | Lisp_Object Qpost_command_hook, Vpost_command_hook; |
| 441 | Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; | 441 | Lisp_Object Qcommand_hook_internal, Vcommand_hook_internal; |
| 442 | 442 | ||
| 443 | /* Parent keymap of terminal-local function-key-map instances. */ | ||
| 444 | Lisp_Object Vfunction_key_map; | ||
| 445 | |||
| 443 | /* Parent keymap of terminal-local key-translation-map instances. */ | 446 | /* Parent keymap of terminal-local key-translation-map instances. */ |
| 444 | Lisp_Object Vglobal_key_translation_map; | 447 | Lisp_Object Vkey_translation_map; |
| 445 | 448 | ||
| 446 | /* List of deferred actions to be performed at a later time. | 449 | /* List of deferred actions to be performed at a later time. |
| 447 | The precise format isn't relevant here; we just check whether it is nil. */ | 450 | The precise format isn't relevant here; we just check whether it is nil. */ |
| @@ -8666,8 +8669,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, | |||
| 8666 | last_nonmenu_event = Qnil; | 8669 | last_nonmenu_event = Qnil; |
| 8667 | 8670 | ||
| 8668 | delayed_switch_frame = Qnil; | 8671 | delayed_switch_frame = Qnil; |
| 8669 | fkey.map = fkey.parent = current_kboard->Vfunction_key_map; | 8672 | fkey.map = fkey.parent = current_kboard->Vlocal_function_key_map; |
| 8670 | keytran.map = keytran.parent = current_kboard->Vkey_translation_map; | 8673 | keytran.map = keytran.parent = current_kboard->Vlocal_key_translation_map; |
| 8671 | /* If there is no translation-map, turn off scanning. */ | 8674 | /* If there is no translation-map, turn off scanning. */ |
| 8672 | fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1; | 8675 | fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1; |
| 8673 | keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1; | 8676 | keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1; |
| @@ -10780,9 +10783,10 @@ init_kboard (kb) | |||
| 10780 | kb->reference_count = 0; | 10783 | kb->reference_count = 0; |
| 10781 | kb->Vsystem_key_alist = Qnil; | 10784 | kb->Vsystem_key_alist = Qnil; |
| 10782 | kb->system_key_syms = Qnil; | 10785 | kb->system_key_syms = Qnil; |
| 10783 | kb->Vfunction_key_map = Fmake_sparse_keymap (Qnil); | 10786 | kb->Vlocal_function_key_map = Fmake_sparse_keymap (Qnil); |
| 10784 | kb->Vkey_translation_map = Fmake_sparse_keymap (Qnil); | 10787 | Fset_keymap_parent (kb->Vlocal_function_key_map, Vfunction_key_map); |
| 10785 | Fset_keymap_parent (kb->Vkey_translation_map, Vglobal_key_translation_map); | 10788 | kb->Vlocal_key_translation_map = Fmake_sparse_keymap (Qnil); |
| 10789 | Fset_keymap_parent (kb->Vlocal_key_translation_map, Vkey_translation_map); | ||
| 10786 | kb->Vdefault_minibuffer_frame = Qnil; | 10790 | kb->Vdefault_minibuffer_frame = Qnil; |
| 10787 | } | 10791 | } |
| 10788 | 10792 | ||
| @@ -11496,7 +11500,7 @@ which binding of this variable is active at any given moment. If you | |||
| 11496 | need set or get the binding on a specific display, use | 11500 | need set or get the binding on a specific display, use |
| 11497 | `terminal-local-value' and `set-terminal-local-value'. */); | 11501 | `terminal-local-value' and `set-terminal-local-value'. */); |
| 11498 | 11502 | ||
| 11499 | DEFVAR_KBOARD ("function-key-map", Vfunction_key_map, | 11503 | DEFVAR_KBOARD ("local-function-key-map", Vlocal_function_key_map, |
| 11500 | doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. | 11504 | doc: /* Keymap mapping ASCII function key sequences onto their preferred forms. |
| 11501 | This allows Emacs to recognize function keys sent from ASCII | 11505 | This allows Emacs to recognize function keys sent from ASCII |
| 11502 | terminals at any point in a key sequence. | 11506 | terminals at any point in a key sequence. |
| @@ -11517,14 +11521,22 @@ Typing `ESC O P' to `read-key-sequence' would return [f1]. Typing | |||
| 11517 | key, typing `ESC O P x' would return [f1 x]. | 11521 | key, typing `ESC O P x' would return [f1 x]. |
| 11518 | 11522 | ||
| 11519 | `function-key-map' has a separate binding for each display device. | 11523 | `function-key-map' has a separate binding for each display device. |
| 11520 | See Info node `(elisp)Multiple displays'. | 11524 | See Info node `(elisp)Multiple displays'. If you need to define a |
| 11525 | binding on all display devices, change `global-function-key-map' | ||
| 11526 | instead. | ||
| 11521 | 11527 | ||
| 11522 | Note that the currently selected frame has very little to do with | 11528 | Note that the currently selected frame has very little to do with |
| 11523 | which binding of this variable is active at any given moment. If you | 11529 | which binding of this variable is active at any given moment. If you |
| 11524 | need set or get the binding on a specific display, use | 11530 | need set or get the binding on a specific display, use |
| 11525 | `terminal-local-value' and `set-terminal-local-value'. */); | 11531 | `terminal-local-value' and `set-terminal-local-value'. */); |
| 11526 | 11532 | ||
| 11527 | DEFVAR_KBOARD ("key-translation-map", Vkey_translation_map, | 11533 | DEFVAR_LISP ("function-key-map", &Vfunction_key_map, |
| 11534 | doc: /* The parent keymap of all `local-function-key-map' instances. | ||
| 11535 | Function key definitions that apply to all display devices should go | ||
| 11536 | here. */); | ||
| 11537 | Vfunction_key_map = Fmake_sparse_keymap (Qnil); | ||
| 11538 | |||
| 11539 | DEFVAR_KBOARD ("local-key-translation-map", Vlocal_key_translation_map, | ||
| 11528 | doc: /* Keymap of key translations that can override keymaps. | 11540 | doc: /* Keymap of key translations that can override keymaps. |
| 11529 | This keymap works like `function-key-map', but comes after that, | 11541 | This keymap works like `function-key-map', but comes after that, |
| 11530 | and its non-prefix bindings override ordinary bindings. | 11542 | and its non-prefix bindings override ordinary bindings. |
| @@ -11538,11 +11550,10 @@ which binding of this variable is active at any given moment. If you | |||
| 11538 | need set or get the binding on a specific display, use | 11550 | need set or get the binding on a specific display, use |
| 11539 | `terminal-local-value' and `set-terminal-local-value'. */); | 11551 | `terminal-local-value' and `set-terminal-local-value'. */); |
| 11540 | 11552 | ||
| 11541 | DEFVAR_LISP ("global-key-translation-map", &Vglobal_key_translation_map, | 11553 | DEFVAR_LISP ("key-translation-map", &Vkey_translation_map, |
| 11542 | doc: /* The parent keymap of all terminal-local `key-translation-map' instances. | 11554 | doc: /* The parent keymap of all `local-key-translation-map' instances. |
| 11543 | Key translations that are not specific to a display device flavour | 11555 | Key translations that apply to all display devices should go here. */); |
| 11544 | should go here. */); | 11556 | Vkey_translation_map = Fmake_sparse_keymap (Qnil); |
| 11545 | Vglobal_key_translation_map = Fmake_sparse_keymap (Qnil); | ||
| 11546 | 11557 | ||
| 11547 | DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list, | 11558 | DEFVAR_LISP ("deferred-action-list", &Vdeferred_action_list, |
| 11548 | doc: /* List of deferred actions to be performed at a later time. | 11559 | doc: /* List of deferred actions to be performed at a later time. |
| @@ -11707,8 +11718,8 @@ mark_kboards () | |||
| 11707 | mark_object (kb->Vlast_kbd_macro); | 11718 | mark_object (kb->Vlast_kbd_macro); |
| 11708 | mark_object (kb->Vsystem_key_alist); | 11719 | mark_object (kb->Vsystem_key_alist); |
| 11709 | mark_object (kb->system_key_syms); | 11720 | mark_object (kb->system_key_syms); |
| 11710 | mark_object (kb->Vfunction_key_map); | 11721 | mark_object (kb->Vlocal_function_key_map); |
| 11711 | mark_object (kb->Vkey_translation_map); | 11722 | mark_object (kb->Vlocal_key_translation_map); |
| 11712 | mark_object (kb->Vdefault_minibuffer_frame); | 11723 | mark_object (kb->Vdefault_minibuffer_frame); |
| 11713 | mark_object (kb->echo_string); | 11724 | mark_object (kb->echo_string); |
| 11714 | } | 11725 | } |
diff --git a/src/keyboard.h b/src/keyboard.h index 7710838c6e3..10b64dfe488 100644 --- a/src/keyboard.h +++ b/src/keyboard.h | |||
| @@ -123,10 +123,10 @@ struct kboard | |||
| 123 | /* Keymap mapping ASCII function key sequences onto their | 123 | /* Keymap mapping ASCII function key sequences onto their |
| 124 | preferred forms. Initialized by the terminal-specific lisp | 124 | preferred forms. Initialized by the terminal-specific lisp |
| 125 | files. See the DEFVAR for more documentation. */ | 125 | files. See the DEFVAR for more documentation. */ |
| 126 | Lisp_Object Vfunction_key_map; | 126 | Lisp_Object Vlocal_function_key_map; |
| 127 | 127 | ||
| 128 | /* Keymap of key translations that can override keymaps. */ | 128 | /* Keymap of key translations that can override keymaps. */ |
| 129 | Lisp_Object Vkey_translation_map; | 129 | Lisp_Object Vlocal_key_translation_map; |
| 130 | 130 | ||
| 131 | /* Minibufferless frames on this display use this frame's minibuffer. */ | 131 | /* Minibufferless frames on this display use this frame's minibuffer. */ |
| 132 | Lisp_Object Vdefault_minibuffer_frame; | 132 | Lisp_Object Vdefault_minibuffer_frame; |
| @@ -304,8 +304,11 @@ extern Lisp_Object read_char P_ ((int, int, Lisp_Object *, Lisp_Object, int *)); | |||
| 304 | /* User-supplied string to translate input characters through. */ | 304 | /* User-supplied string to translate input characters through. */ |
| 305 | extern Lisp_Object Vkeyboard_translate_table; | 305 | extern Lisp_Object Vkeyboard_translate_table; |
| 306 | 306 | ||
| 307 | /* Parent keymap of terminal-local function-key-map instances. */ | ||
| 308 | extern Lisp_Object Vfunction_key_map; | ||
| 309 | |||
| 307 | /* Parent keymap of terminal-local key-translation-map instances. */ | 310 | /* Parent keymap of terminal-local key-translation-map instances. */ |
| 308 | extern Lisp_Object Vglobal_key_translation_map; | 311 | extern Lisp_Object Vkey_translation_map; |
| 309 | 312 | ||
| 310 | 313 | ||
| 311 | extern int parse_menu_item P_ ((Lisp_Object, int, int)); | 314 | extern int parse_menu_item P_ ((Lisp_Object, int, int)); |
diff --git a/src/keymap.c b/src/keymap.c index b9247122ccd..17c55cfd2d6 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2841,8 +2841,8 @@ You type Translation\n\ | |||
| 2841 | insert ("\n", 1); | 2841 | insert ("\n", 1); |
| 2842 | } | 2842 | } |
| 2843 | 2843 | ||
| 2844 | if (!NILP (current_kboard->Vkey_translation_map)) | 2844 | if (!NILP (current_kboard->Vlocal_key_translation_map)) |
| 2845 | describe_map_tree (current_kboard->Vkey_translation_map, 0, Qnil, prefix, | 2845 | describe_map_tree (current_kboard->Vlocal_key_translation_map, 0, Qnil, prefix, |
| 2846 | "Key translations", nomenu, 1, 0, 0); | 2846 | "Key translations", nomenu, 1, 0, 0); |
| 2847 | 2847 | ||
| 2848 | 2848 | ||
| @@ -2931,8 +2931,8 @@ You type Translation\n\ | |||
| 2931 | "\f\nGlobal Bindings", nomenu, 0, 1, 0); | 2931 | "\f\nGlobal Bindings", nomenu, 0, 1, 0); |
| 2932 | 2932 | ||
| 2933 | /* Print the function-key-map translations under this prefix. */ | 2933 | /* Print the function-key-map translations under this prefix. */ |
| 2934 | if (!NILP (current_kboard->Vfunction_key_map)) | 2934 | if (!NILP (current_kboard->Vlocal_function_key_map)) |
| 2935 | describe_map_tree (current_kboard->Vfunction_key_map, 0, Qnil, prefix, | 2935 | describe_map_tree (current_kboard->Vlocal_function_key_map, 0, Qnil, prefix, |
| 2936 | "\f\nFunction key map translations", nomenu, 1, 0, 0); | 2936 | "\f\nFunction key map translations", nomenu, 1, 0, 0); |
| 2937 | 2937 | ||
| 2938 | UNGCPRO; | 2938 | UNGCPRO; |
diff --git a/src/term.c b/src/term.c index 14396a0c1d2..e340edb6c17 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1350,13 +1350,13 @@ term_get_fkeys_1 () | |||
| 1350 | 1350 | ||
| 1351 | /* This can happen if CANNOT_DUMP or with strange options. */ | 1351 | /* This can happen if CANNOT_DUMP or with strange options. */ |
| 1352 | if (!initialized) | 1352 | if (!initialized) |
| 1353 | kboard->Vfunction_key_map = Fmake_sparse_keymap (Qnil); | 1353 | kboard->Vlocal_function_key_map = Fmake_sparse_keymap (Qnil); |
| 1354 | 1354 | ||
| 1355 | for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) | 1355 | for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++) |
| 1356 | { | 1356 | { |
| 1357 | char *sequence = tgetstr (keys[i].cap, address); | 1357 | char *sequence = tgetstr (keys[i].cap, address); |
| 1358 | if (sequence) | 1358 | if (sequence) |
| 1359 | Fdefine_key (kboard->Vfunction_key_map, build_string (sequence), | 1359 | Fdefine_key (kboard->Vlocal_function_key_map, build_string (sequence), |
| 1360 | Fmake_vector (make_number (1), | 1360 | Fmake_vector (make_number (1), |
| 1361 | intern (keys[i].name))); | 1361 | intern (keys[i].name))); |
| 1362 | } | 1362 | } |
| @@ -1376,13 +1376,13 @@ term_get_fkeys_1 () | |||
| 1376 | if (k0) | 1376 | if (k0) |
| 1377 | /* Define f0 first, so that f10 takes precedence in case the | 1377 | /* Define f0 first, so that f10 takes precedence in case the |
| 1378 | key sequences happens to be the same. */ | 1378 | key sequences happens to be the same. */ |
| 1379 | Fdefine_key (kboard->Vfunction_key_map, build_string (k0), | 1379 | Fdefine_key (kboard->Vlocal_function_key_map, build_string (k0), |
| 1380 | Fmake_vector (make_number (1), intern ("f0"))); | 1380 | Fmake_vector (make_number (1), intern ("f0"))); |
| 1381 | Fdefine_key (kboard->Vfunction_key_map, build_string (k_semi), | 1381 | Fdefine_key (kboard->Vlocal_function_key_map, build_string (k_semi), |
| 1382 | Fmake_vector (make_number (1), intern ("f10"))); | 1382 | Fmake_vector (make_number (1), intern ("f10"))); |
| 1383 | } | 1383 | } |
| 1384 | else if (k0) | 1384 | else if (k0) |
| 1385 | Fdefine_key (kboard->Vfunction_key_map, build_string (k0), | 1385 | Fdefine_key (kboard->Vlocal_function_key_map, build_string (k0), |
| 1386 | Fmake_vector (make_number (1), intern (k0_name))); | 1386 | Fmake_vector (make_number (1), intern (k0_name))); |
| 1387 | } | 1387 | } |
| 1388 | 1388 | ||
| @@ -1405,7 +1405,7 @@ term_get_fkeys_1 () | |||
| 1405 | if (sequence) | 1405 | if (sequence) |
| 1406 | { | 1406 | { |
| 1407 | sprintf (fkey, "f%d", i); | 1407 | sprintf (fkey, "f%d", i); |
| 1408 | Fdefine_key (kboard->Vfunction_key_map, build_string (sequence), | 1408 | Fdefine_key (kboard->Vlocal_function_key_map, build_string (sequence), |
| 1409 | Fmake_vector (make_number (1), | 1409 | Fmake_vector (make_number (1), |
| 1410 | intern (fkey))); | 1410 | intern (fkey))); |
| 1411 | } | 1411 | } |
| @@ -1422,7 +1422,7 @@ term_get_fkeys_1 () | |||
| 1422 | { \ | 1422 | { \ |
| 1423 | char *sequence = tgetstr (cap2, address); \ | 1423 | char *sequence = tgetstr (cap2, address); \ |
| 1424 | if (sequence) \ | 1424 | if (sequence) \ |
| 1425 | Fdefine_key (kboard->Vfunction_key_map, build_string (sequence), \ | 1425 | Fdefine_key (kboard->Vlocal_function_key_map, build_string (sequence), \ |
| 1426 | Fmake_vector (make_number (1), \ | 1426 | Fmake_vector (make_number (1), \ |
| 1427 | intern (sym))); \ | 1427 | intern (sym))); \ |
| 1428 | } | 1428 | } |