aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.c
diff options
context:
space:
mode:
authorKen Raeburn2002-07-15 00:01:34 +0000
committerKen Raeburn2002-07-15 00:01:34 +0000
commitd5db40779d7505244d37476b4f046641f07eea2b (patch)
tree5c8bf4dad41639287e722cb7cbdc0709e47a9e53 /src/keymap.c
parent491c2516d32fa8b9ba9422ec142c8925dd82af00 (diff)
downloademacs-d5db40779d7505244d37476b4f046641f07eea2b.tar.gz
emacs-d5db40779d7505244d37476b4f046641f07eea2b.zip
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references left unchanged for now.
Diffstat (limited to 'src/keymap.c')
-rw-r--r--src/keymap.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/keymap.c b/src/keymap.c
index 467b5119b98..21c3bbdc232 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1062,7 +1062,7 @@ the front of KEYMAP. */)
1062 /* We must use Fkey_description rather than just passing key to 1062 /* We must use Fkey_description rather than just passing key to
1063 error; key might be a vector, not a string. */ 1063 error; key might be a vector, not a string. */
1064 error ("Key sequence %s uses invalid prefix characters", 1064 error ("Key sequence %s uses invalid prefix characters",
1065 XSTRING (Fkey_description (key))->data); 1065 SDATA (Fkey_description (key)));
1066 } 1066 }
1067} 1067}
1068 1068
@@ -1223,8 +1223,8 @@ silly_event_symbol_error (c)
1223 error ((modifiers & ~meta_modifier 1223 error ((modifiers & ~meta_modifier
1224 ? "To bind the key %s, use [?%s], not [%s]" 1224 ? "To bind the key %s, use [?%s], not [%s]"
1225 : "To bind the key %s, use \"%s\", not [%s]"), 1225 : "To bind the key %s, use \"%s\", not [%s]"),
1226 XSTRING (SYMBOL_NAME (c))->data, XSTRING (keystring)->data, 1226 SDATA (SYMBOL_NAME (c)), SDATA (keystring),
1227 XSTRING (SYMBOL_NAME (c))->data); 1227 SDATA (SYMBOL_NAME (c)));
1228 } 1228 }
1229} 1229}
1230 1230
@@ -1746,8 +1746,8 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1746 int i, i_byte, c; 1746 int i, i_byte, c;
1747 Lisp_Object copy; 1747 Lisp_Object copy;
1748 1748
1749 copy = Fmake_vector (make_number (XSTRING (prefix)->size), Qnil); 1749 copy = Fmake_vector (make_number (SCHARS (prefix)), Qnil);
1750 for (i = 0, i_byte = 0; i < XSTRING (prefix)->size;) 1750 for (i = 0, i_byte = 0; i < SCHARS (prefix);)
1751 { 1751 {
1752 int i_before = i; 1752 int i_before = i;
1753 1753
@@ -1876,7 +1876,7 @@ spaces are put between sequence elements, etc. */)
1876 { 1876 {
1877 Lisp_Object vector; 1877 Lisp_Object vector;
1878 vector = Fmake_vector (Flength (keys), Qnil); 1878 vector = Fmake_vector (Flength (keys), Qnil);
1879 for (i = 0, i_byte = 0; i < XSTRING (keys)->size; ) 1879 for (i = 0, i_byte = 0; i < SCHARS (keys); )
1880 { 1880 {
1881 int c; 1881 int c;
1882 int i_before = i; 1882 int i_before = i;
@@ -2120,8 +2120,8 @@ around function keys and event symbols. */)
2120 if (NILP (no_angles)) 2120 if (NILP (no_angles))
2121 { 2121 {
2122 char *buffer 2122 char *buffer
2123 = (char *) alloca (STRING_BYTES (XSTRING (SYMBOL_NAME (key))) + 5); 2123 = (char *) alloca (SBYTES (SYMBOL_NAME (key)) + 5);
2124 sprintf (buffer, "<%s>", XSTRING (SYMBOL_NAME (key))->data); 2124 sprintf (buffer, "<%s>", SDATA (SYMBOL_NAME (key)));
2125 return build_string (buffer); 2125 return build_string (buffer);
2126 } 2126 }
2127 else 2127 else
@@ -2659,8 +2659,8 @@ You type Translation\n\
2659 if (STRINGP (Vkeyboard_translate_table) && !NILP (prefix)) 2659 if (STRINGP (Vkeyboard_translate_table) && !NILP (prefix))
2660 { 2660 {
2661 int c; 2661 int c;
2662 unsigned char *translate = XSTRING (Vkeyboard_translate_table)->data; 2662 unsigned char *translate = SDATA (Vkeyboard_translate_table);
2663 int translate_len = XSTRING (Vkeyboard_translate_table)->size; 2663 int translate_len = SCHARS (Vkeyboard_translate_table);
2664 2664
2665 for (c = 0; c < translate_len; c++) 2665 for (c = 0; c < translate_len; c++)
2666 if (translate[c] != c) 2666 if (translate[c] != c)
@@ -2738,13 +2738,13 @@ You type Translation\n\
2738 if (!SYMBOLP (modes[i])) 2738 if (!SYMBOLP (modes[i]))
2739 abort(); 2739 abort();
2740 2740
2741 p = title = (char *) alloca (42 + XSTRING (SYMBOL_NAME (modes[i]))->size); 2741 p = title = (char *) alloca (42 + SCHARS (SYMBOL_NAME (modes[i])));
2742 *p++ = '\f'; 2742 *p++ = '\f';
2743 *p++ = '\n'; 2743 *p++ = '\n';
2744 *p++ = '`'; 2744 *p++ = '`';
2745 bcopy (XSTRING (SYMBOL_NAME (modes[i]))->data, p, 2745 bcopy (SDATA (SYMBOL_NAME (modes[i])), p,
2746 XSTRING (SYMBOL_NAME (modes[i]))->size); 2746 SCHARS (SYMBOL_NAME (modes[i])));
2747 p += XSTRING (SYMBOL_NAME (modes[i]))->size; 2747 p += SCHARS (SYMBOL_NAME (modes[i]));
2748 *p++ = '\''; 2748 *p++ = '\'';
2749 bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings") - 1); 2749 bcopy (" Minor Mode Bindings", p, sizeof (" Minor Mode Bindings") - 1);
2750 p += sizeof (" Minor Mode Bindings") - 1; 2750 p += sizeof (" Minor Mode Bindings") - 1;
@@ -2875,7 +2875,7 @@ key binding\n\
2875 2875
2876 /* If the sequence by which we reach this keymap is zero-length, 2876 /* If the sequence by which we reach this keymap is zero-length,
2877 then the shadow map for this keymap is just SHADOW. */ 2877 then the shadow map for this keymap is just SHADOW. */
2878 if ((STRINGP (prefix) && XSTRING (prefix)->size == 0) 2878 if ((STRINGP (prefix) && SCHARS (prefix) == 0)
2879 || (VECTORP (prefix) && XVECTOR (prefix)->size == 0)) 2879 || (VECTORP (prefix) && XVECTOR (prefix)->size == 0))
2880 ; 2880 ;
2881 /* If the sequence by which we reach this keymap actually has 2881 /* If the sequence by which we reach this keymap actually has
@@ -3361,8 +3361,8 @@ describe_vector (vector, elt_prefix, args, elt_describer,
3361 insert_string ("<"); 3361 insert_string ("<");
3362 tem2 = CHARSET_TABLE_INFO (i - 128, CHARSET_SHORT_NAME_IDX); 3362 tem2 = CHARSET_TABLE_INFO (i - 128, CHARSET_SHORT_NAME_IDX);
3363 if (STRINGP (tem2)) 3363 if (STRINGP (tem2))
3364 insert_from_string (tem2, 0, 0, XSTRING (tem2)->size, 3364 insert_from_string (tem2, 0, 0, SCHARS (tem2),
3365 STRING_BYTES (XSTRING (tem2)), 0); 3365 SBYTES (tem2), 0);
3366 else 3366 else
3367 insert ("?", 1); 3367 insert ("?", 1);
3368 insert (">", 1); 3368 insert (">", 1);