aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorPaul Eggert2011-02-17 23:44:39 -0800
committerPaul Eggert2011-02-17 23:44:39 -0800
commit37b3d30244ad822e049b6b20c2eadf5946cb02cc (patch)
tree49bfe5e475aee761975f2618be4ee1b7c8371a72 /src/keymap.c
parent0ca2f89e09202a02f392c1defba2105b69c01419 (diff)
parent7d315eb67800796d7d7f39030eb7682340d985e5 (diff)
downloademacs-37b3d30244ad822e049b6b20c2eadf5946cb02cc.tar.gz
emacs-37b3d30244ad822e049b6b20c2eadf5946cb02cc.zip
Merge from mainline.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/keymap.c b/src/keymap.c
index b694deadcba..0e4715e4b8b 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1565,8 +1565,8 @@ like in the respective argument of `key-binding'. */)
1565 1565
1566 if (!NILP (olp)) 1566 if (!NILP (olp))
1567 { 1567 {
1568 if (!NILP (current_kboard->Voverriding_terminal_local_map)) 1568 if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
1569 keymaps = Fcons (current_kboard->Voverriding_terminal_local_map, keymaps); 1569 keymaps = Fcons (KVAR (current_kboard, Voverriding_terminal_local_map), keymaps);
1570 /* The doc said that overriding-terminal-local-map should 1570 /* The doc said that overriding-terminal-local-map should
1571 override overriding-local-map. The code used them both, 1571 override overriding-local-map. The code used them both,
1572 but it seems clearer to use just one. rms, jan 2005. */ 1572 but it seems clearer to use just one. rms, jan 2005. */
@@ -1745,9 +1745,9 @@ specified buffer position instead of point are used.
1745 } 1745 }
1746 } 1746 }
1747 1747
1748 if (! NILP (current_kboard->Voverriding_terminal_local_map)) 1748 if (! NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
1749 { 1749 {
1750 value = Flookup_key (current_kboard->Voverriding_terminal_local_map, 1750 value = Flookup_key (KVAR (current_kboard, Voverriding_terminal_local_map),
1751 key, accept_default); 1751 key, accept_default);
1752 if (! NILP (value) && !INTEGERP (value)) 1752 if (! NILP (value) && !INTEGERP (value))
1753 goto done; 1753 goto done;
@@ -1883,7 +1883,7 @@ bindings; see the description of `lookup-key' for more details about this. */)
1883 (Lisp_Object keys, Lisp_Object accept_default) 1883 (Lisp_Object keys, Lisp_Object accept_default)
1884{ 1884{
1885 register Lisp_Object map; 1885 register Lisp_Object map;
1886 map = B_ (current_buffer, keymap); 1886 map = BVAR (current_buffer, keymap);
1887 if (NILP (map)) 1887 if (NILP (map))
1888 return Qnil; 1888 return Qnil;
1889 return Flookup_key (map, keys, accept_default); 1889 return Flookup_key (map, keys, accept_default);
@@ -1988,7 +1988,7 @@ If KEYMAP is nil, that means no local keymap. */)
1988 if (!NILP (keymap)) 1988 if (!NILP (keymap))
1989 keymap = get_keymap (keymap, 1, 1); 1989 keymap = get_keymap (keymap, 1, 1);
1990 1990
1991 B_ (current_buffer, keymap) = keymap; 1991 BVAR (current_buffer, keymap) = keymap;
1992 1992
1993 return Qnil; 1993 return Qnil;
1994} 1994}
@@ -1998,7 +1998,7 @@ DEFUN ("current-local-map", Fcurrent_local_map, Scurrent_local_map, 0, 0, 0,
1998Normally the local keymap is set by the major mode with `use-local-map'. */) 1998Normally the local keymap is set by the major mode with `use-local-map'. */)
1999 (void) 1999 (void)
2000{ 2000{
2001 return B_ (current_buffer, keymap); 2001 return BVAR (current_buffer, keymap);
2002} 2002}
2003 2003
2004DEFUN ("current-global-map", Fcurrent_global_map, Scurrent_global_map, 0, 0, 0, 2004DEFUN ("current-global-map", Fcurrent_global_map, Scurrent_global_map, 0, 0, 0,
@@ -2379,7 +2379,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi
2379 *p++ = 'C'; 2379 *p++ = 'C';
2380 } 2380 }
2381 else if (c < 128 2381 else if (c < 128
2382 || (NILP (B_ (current_buffer, enable_multibyte_characters)) 2382 || (NILP (BVAR (current_buffer, enable_multibyte_characters))
2383 && SINGLE_BYTE_CHAR_P (c) 2383 && SINGLE_BYTE_CHAR_P (c)
2384 && !force_multibyte)) 2384 && !force_multibyte))
2385 { 2385 {
@@ -2388,7 +2388,7 @@ push_key_description (register unsigned int c, register char *p, int force_multi
2388 else 2388 else
2389 { 2389 {
2390 /* Now we are sure that C is a valid character code. */ 2390 /* Now we are sure that C is a valid character code. */
2391 if (NILP (B_ (current_buffer, enable_multibyte_characters)) 2391 if (NILP (BVAR (current_buffer, enable_multibyte_characters))
2392 && ! force_multibyte) 2392 && ! force_multibyte)
2393 *p++ = multibyte_char_to_unibyte (c, Qnil); 2393 *p++ = multibyte_char_to_unibyte (c, Qnil);
2394 else 2394 else
@@ -2941,11 +2941,11 @@ You type Translation\n\
2941 outbuf = Fcurrent_buffer (); 2941 outbuf = Fcurrent_buffer ();
2942 2942
2943 /* Report on alternates for keys. */ 2943 /* Report on alternates for keys. */
2944 if (STRINGP (current_kboard->Vkeyboard_translate_table) && !NILP (prefix)) 2944 if (STRINGP (KVAR (current_kboard, Vkeyboard_translate_table)) && !NILP (prefix))
2945 { 2945 {
2946 int c; 2946 int c;
2947 const unsigned char *translate = SDATA (current_kboard->Vkeyboard_translate_table); 2947 const unsigned char *translate = SDATA (KVAR (current_kboard, Vkeyboard_translate_table));
2948 int translate_len = SCHARS (current_kboard->Vkeyboard_translate_table); 2948 int translate_len = SCHARS (KVAR (current_kboard, Vkeyboard_translate_table));
2949 2949
2950 for (c = 0; c < translate_len; c++) 2950 for (c = 0; c < translate_len; c++)
2951 if (translate[c] != c) 2951 if (translate[c] != c)
@@ -2968,7 +2968,7 @@ You type Translation\n\
2968 insert ("\n", 1); 2968 insert ("\n", 1);
2969 2969
2970 /* Insert calls signal_after_change which may GC. */ 2970 /* Insert calls signal_after_change which may GC. */
2971 translate = SDATA (current_kboard->Vkeyboard_translate_table); 2971 translate = SDATA (KVAR (current_kboard, Vkeyboard_translate_table));
2972 } 2972 }
2973 2973
2974 insert ("\n", 1); 2974 insert ("\n", 1);
@@ -2981,8 +2981,8 @@ You type Translation\n\
2981 2981
2982 /* Print the (major mode) local map. */ 2982 /* Print the (major mode) local map. */
2983 start1 = Qnil; 2983 start1 = Qnil;
2984 if (!NILP (current_kboard->Voverriding_terminal_local_map)) 2984 if (!NILP (KVAR (current_kboard, Voverriding_terminal_local_map)))
2985 start1 = current_kboard->Voverriding_terminal_local_map; 2985 start1 = KVAR (current_kboard, Voverriding_terminal_local_map);
2986 else if (!NILP (Voverriding_local_map)) 2986 else if (!NILP (Voverriding_local_map))
2987 start1 = Voverriding_local_map; 2987 start1 = Voverriding_local_map;
2988 2988
@@ -3048,7 +3048,7 @@ You type Translation\n\
3048 XBUFFER (buffer), Qlocal_map); 3048 XBUFFER (buffer), Qlocal_map);
3049 if (!NILP (start1)) 3049 if (!NILP (start1))
3050 { 3050 {
3051 if (EQ (start1, B_ (XBUFFER (buffer), keymap))) 3051 if (EQ (start1, BVAR (XBUFFER (buffer), keymap)))
3052 describe_map_tree (start1, 1, shadow, prefix, 3052 describe_map_tree (start1, 1, shadow, prefix,
3053 "\f\nMajor Mode Bindings", nomenu, 0, 0, 0); 3053 "\f\nMajor Mode Bindings", nomenu, 0, 0, 0);
3054 else 3054 else
@@ -3064,13 +3064,13 @@ You type Translation\n\
3064 "\f\nGlobal Bindings", nomenu, 0, 1, 0); 3064 "\f\nGlobal Bindings", nomenu, 0, 1, 0);
3065 3065
3066 /* Print the function-key-map translations under this prefix. */ 3066 /* Print the function-key-map translations under this prefix. */
3067 if (!NILP (current_kboard->Vlocal_function_key_map)) 3067 if (!NILP (KVAR (current_kboard, Vlocal_function_key_map)))
3068 describe_map_tree (current_kboard->Vlocal_function_key_map, 0, Qnil, prefix, 3068 describe_map_tree (KVAR (current_kboard, Vlocal_function_key_map), 0, Qnil, prefix,
3069 "\f\nFunction key map translations", nomenu, 1, 0, 0); 3069 "\f\nFunction key map translations", nomenu, 1, 0, 0);
3070 3070
3071 /* Print the input-decode-map translations under this prefix. */ 3071 /* Print the input-decode-map translations under this prefix. */
3072 if (!NILP (current_kboard->Vinput_decode_map)) 3072 if (!NILP (KVAR (current_kboard, Vinput_decode_map)))
3073 describe_map_tree (current_kboard->Vinput_decode_map, 0, Qnil, prefix, 3073 describe_map_tree (KVAR (current_kboard, Vinput_decode_map), 0, Qnil, prefix,
3074 "\f\nInput decoding map translations", nomenu, 1, 0, 0); 3074 "\f\nInput decoding map translations", nomenu, 1, 0, 0);
3075 3075
3076 UNGCPRO; 3076 UNGCPRO;