Mercurial > emacs
comparison src/keyboard.c @ 83346:7372c2f9daac
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Tue, 12 Jul 2005 10:55:24 +0000 |
parents | 9216636c02fc |
children | 532e0a9335a9 |
comparison
equal
deleted
inserted
replaced
83345:817977e20b0d | 83346:7372c2f9daac |
---|---|
438 /* Hooks to run before and after each command. */ | 438 /* Hooks to run before and after each command. */ |
439 Lisp_Object Qpre_command_hook, Vpre_command_hook; | 439 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. */ |
448 Lisp_Object Vdeferred_action_list; | 451 Lisp_Object Vdeferred_action_list; |
449 | 452 |
8664 raw_keybuf_count = 0; | 8667 raw_keybuf_count = 0; |
8665 | 8668 |
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; |
8674 | 8677 |
8675 if (INTERACTIVE) | 8678 if (INTERACTIVE) |
10778 kb->defining_kbd_macro = Qnil; | 10781 kb->defining_kbd_macro = Qnil; |
10779 kb->Vlast_kbd_macro = Qnil; | 10782 kb->Vlast_kbd_macro = Qnil; |
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 |
10789 /* | 10793 /* |
10790 * Destroy the contents of a kboard object, but not the object itself. | 10794 * Destroy the contents of a kboard object, but not the object itself. |
11494 Note that the currently selected frame has very little to do with | 11498 Note that the currently selected frame has very little to do with |
11495 which binding of this variable is active at any given moment. If you | 11499 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. |
11503 | 11507 |
11504 The `read-key-sequence' function replaces any subsequence bound by | 11508 The `read-key-sequence' function replaces any subsequence bound by |
11515 Typing `ESC O P' to `read-key-sequence' would return [f1]. Typing | 11519 Typing `ESC O P' to `read-key-sequence' would return [f1]. Typing |
11516 `C-x ESC O P' would return [?\\C-x f1]. If [f1] were a prefix | 11520 `C-x ESC O P' would return [?\\C-x f1]. If [f1] were a prefix |
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. |
11531 | 11543 |
11532 `key-translation-map' has a separate binding for each display device. | 11544 `key-translation-map' has a separate binding for each display device. |
11536 Note that the currently selected frame has very little to do with | 11548 Note that the currently selected frame has very little to do with |
11537 which binding of this variable is active at any given moment. If you | 11549 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. |
11549 The precise format isn't relevant here; we just check whether it is nil. */); | 11560 The precise format isn't relevant here; we just check whether it is nil. */); |
11550 Vdeferred_action_list = Qnil; | 11561 Vdeferred_action_list = Qnil; |
11705 mark_object (kb->kbd_queue); | 11716 mark_object (kb->kbd_queue); |
11706 mark_object (kb->defining_kbd_macro); | 11717 mark_object (kb->defining_kbd_macro); |
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 } |
11715 { | 11726 { |
11716 struct input_event *event; | 11727 struct input_event *event; |