comparison src/keyboard.c @ 48229:5d4678fa4feb

(command_loop_1): Apply Vtranslation_table_for_input to self-inserting characters. (syms_of_keyboard) <keyboard-translate-table>: Doc fix.
author Dave Love <fx@gnu.org>
date Sat, 09 Nov 2002 12:48:26 +0000
parents b35ced393e6c
children 12d250ace67f
comparison
equal deleted inserted replaced
48228:461d780ae946 48229:5d4678fa4feb
410 Lisp_Object Vecho_keystrokes; 410 Lisp_Object Vecho_keystrokes;
411 411
412 /* Form to evaluate (if non-nil) when Emacs is started. */ 412 /* Form to evaluate (if non-nil) when Emacs is started. */
413 Lisp_Object Vtop_level; 413 Lisp_Object Vtop_level;
414 414
415 /* User-supplied string to translate input characters through. */ 415 /* User-supplied table to translate input characters. */
416 Lisp_Object Vkeyboard_translate_table; 416 Lisp_Object Vkeyboard_translate_table;
417 417
418 /* Keymap mapping ASCII function key sequences onto their preferred forms. */ 418 /* Keymap mapping ASCII function key sequences onto their preferred forms. */
419 extern Lisp_Object Vfunction_key_map; 419 extern Lisp_Object Vfunction_key_map;
420 420
596 Lisp_Object recursive_edit_unwind (), command_loop (); 596 Lisp_Object recursive_edit_unwind (), command_loop ();
597 Lisp_Object Fthis_command_keys (); 597 Lisp_Object Fthis_command_keys ();
598 Lisp_Object Qextended_command_history; 598 Lisp_Object Qextended_command_history;
599 EMACS_TIME timer_check (); 599 EMACS_TIME timer_check ();
600 600
601 extern Lisp_Object Vhistory_length; 601 extern Lisp_Object Vhistory_length, Vtranslation_table_for_input;
602 602
603 extern char *x_get_keysym_name (); 603 extern char *x_get_keysym_name ();
604 604
605 static void record_menu_key (); 605 static void record_menu_key ();
606 606
1627 && NILP (Vexecuting_macro)) 1627 && NILP (Vexecuting_macro))
1628 direct_output_forward_char (-1); 1628 direct_output_forward_char (-1);
1629 goto directly_done; 1629 goto directly_done;
1630 } 1630 }
1631 else if (EQ (Vthis_command, Qself_insert_command) 1631 else if (EQ (Vthis_command, Qself_insert_command)
1632 /* Try this optimization only on ascii keystrokes. */ 1632 /* Try this optimization only on character keystrokes. */
1633 && INTEGERP (last_command_char)) 1633 && CHAR_VALID_P (last_command_char, 0))
1634 { 1634 {
1635 unsigned int c = XINT (last_command_char); 1635 unsigned int c =
1636 translate_char (Vtranslation_table_for_input,
1637 XINT (last_command_char), 0, 0, 0);
1636 int value; 1638 int value;
1637 if (NILP (Vexecuting_macro) 1639 if (NILP (Vexecuting_macro)
1638 && !EQ (minibuf_window, selected_window)) 1640 && !EQ (minibuf_window, selected_window))
1639 { 1641 {
1640 if (!nonundocount || nonundocount >= 20) 1642 if (!nonundocount || nonundocount >= 20)
10898 doc: /* Translate table for keyboard input, or nil. 10900 doc: /* Translate table for keyboard input, or nil.
10899 Each character is looked up in this string and the contents used instead. 10901 Each character is looked up in this string and the contents used instead.
10900 The value may be a string, a vector, or a char-table. 10902 The value may be a string, a vector, or a char-table.
10901 If it is a string or vector of length N, 10903 If it is a string or vector of length N,
10902 character codes N and up are untranslated. 10904 character codes N and up are untranslated.
10903 In a vector or a char-table, an element which is nil means "no translation". */); 10905 In a vector or a char-table, an element which is nil means "no translation".
10906
10907 This is applied to the characters supplied to input methods, not their
10908 output. See also `translation-table-for-input'. */);
10904 Vkeyboard_translate_table = Qnil; 10909 Vkeyboard_translate_table = Qnil;
10905 10910
10906 DEFVAR_BOOL ("cannot-suspend", &cannot_suspend, 10911 DEFVAR_BOOL ("cannot-suspend", &cannot_suspend,
10907 doc: /* Non-nil means to always spawn a subshell instead of suspending. 10912 doc: /* Non-nil means to always spawn a subshell instead of suspending.
10908 \(Even if the operating system has support for stopping a process.\) */); 10913 \(Even if the operating system has support for stopping a process.\) */);