aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2002-11-09 12:48:26 +0000
committerDave Love2002-11-09 12:48:26 +0000
commita0acc6c756e59f6d0cef68dc703e660c9954ff60 (patch)
tree47209ddd6c352723bb9fedf3ce3ddafe6f6220f4
parent867d5263229a1f56cc21c4ebd8e6ae3b5251ee03 (diff)
downloademacs-a0acc6c756e59f6d0cef68dc703e660c9954ff60.tar.gz
emacs-a0acc6c756e59f6d0cef68dc703e660c9954ff60.zip
(command_loop_1): Apply Vtranslation_table_for_input
to self-inserting characters. (syms_of_keyboard) <keyboard-translate-table>: Doc fix.
-rw-r--r--src/keyboard.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index ea1f82f5639..2984a369734 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -412,7 +412,7 @@ Lisp_Object Vecho_keystrokes;
412/* Form to evaluate (if non-nil) when Emacs is started. */ 412/* Form to evaluate (if non-nil) when Emacs is started. */
413Lisp_Object Vtop_level; 413Lisp_Object Vtop_level;
414 414
415/* User-supplied string to translate input characters through. */ 415/* User-supplied table to translate input characters. */
416Lisp_Object Vkeyboard_translate_table; 416Lisp_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. */
@@ -598,7 +598,7 @@ Lisp_Object Fthis_command_keys ();
598Lisp_Object Qextended_command_history; 598Lisp_Object Qextended_command_history;
599EMACS_TIME timer_check (); 599EMACS_TIME timer_check ();
600 600
601extern Lisp_Object Vhistory_length; 601extern Lisp_Object Vhistory_length, Vtranslation_table_for_input;
602 602
603extern char *x_get_keysym_name (); 603extern char *x_get_keysym_name ();
604 604
@@ -1629,10 +1629,12 @@ command_loop_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))
@@ -10900,7 +10902,10 @@ Each character is looked up in this string and the contents used instead.
10900The value may be a string, a vector, or a char-table. 10902The value may be a string, a vector, or a char-table.
10901If it is a string or vector of length N, 10903If it is a string or vector of length N,
10902character codes N and up are untranslated. 10904character codes N and up are untranslated.
10903In a vector or a char-table, an element which is nil means "no translation". */); 10905In a vector or a char-table, an element which is nil means "no translation".
10906
10907This is applied to the characters supplied to input methods, not their
10908output. 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,