comparison src/keymap.c @ 83391:e99392472e41

Change `keyboard-translate-table' to be terminal-local. * lisp/subr.el (keyboard-translate): Use `terminal-local-value' to access `keyboard-translate-table'. * lisp/obsolete/keyswap.el: Ditto. * src/keyboard.c (Vkeyboard_translate_table): Moved to struct kboard. * src/keyboard.h (Vkeyboard_translate_table): Moved to struct kboard. * src/keyboard.c (read_char): Use current_kboard to access Vkeyboard_translate_table. * src/keymap.c (Fdescribe_buffer_bindings): Ditto. * src/keyboard.c (init_kboard): Initialize Vkeyboard_translate_table. * src/keyboard.c (syms_of_keyboard): Use DEFVAR_KBOARD to define Vkeyboard_translate_table. Update doc strings. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-431
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 28 Oct 2005 14:29:24 +0000
parents 94f174e5569d
children 03934708f1e9
comparison
equal deleted inserted replaced
83390:513453e09ec7 83391:e99392472e41
2810 GCPRO1 (shadow); 2810 GCPRO1 (shadow);
2811 2811
2812 outbuf = Fcurrent_buffer (); 2812 outbuf = Fcurrent_buffer ();
2813 2813
2814 /* Report on alternates for keys. */ 2814 /* Report on alternates for keys. */
2815 if (STRINGP (Vkeyboard_translate_table) && !NILP (prefix)) 2815 if (STRINGP (current_kboard->Vkeyboard_translate_table) && !NILP (prefix))
2816 { 2816 {
2817 int c; 2817 int c;
2818 const unsigned char *translate = SDATA (Vkeyboard_translate_table); 2818 const unsigned char *translate = SDATA (current_kboard->Vkeyboard_translate_table);
2819 int translate_len = SCHARS (Vkeyboard_translate_table); 2819 int translate_len = SCHARS (current_kboard->Vkeyboard_translate_table);
2820 2820
2821 for (c = 0; c < translate_len; c++) 2821 for (c = 0; c < translate_len; c++)
2822 if (translate[c] != c) 2822 if (translate[c] != c)
2823 { 2823 {
2824 char buf[KEY_DESCRIPTION_SIZE]; 2824 char buf[KEY_DESCRIPTION_SIZE];
2837 insert (buf, bufend - buf); 2837 insert (buf, bufend - buf);
2838 2838
2839 insert ("\n", 1); 2839 insert ("\n", 1);
2840 2840
2841 /* Insert calls signal_after_change which may GC. */ 2841 /* Insert calls signal_after_change which may GC. */
2842 translate = SDATA (Vkeyboard_translate_table); 2842 translate = SDATA (current_kboard->Vkeyboard_translate_table);
2843 } 2843 }
2844 2844
2845 insert ("\n", 1); 2845 insert ("\n", 1);
2846 } 2846 }
2847 2847