changeset 29013:b9565b4bcdf8

(Fsingle_key_description): Use SPLIT_CHAR instead of SPLIT_NON_ASCII_CHAR. (describe_vector): Use MAKE_CHAR instead of MAKE_NON_ASCII_CHAR. (Faccessible_keymaps): Use FETCH_STRING_CHAR_ADVANCE unconditionally. (Fkey_description): Likewise.
author Kenichi Handa <handa@m17n.org>
date Sat, 20 May 2000 00:03:16 +0000
parents 9e67ee582342
children 4c02859dda27
files src/keymap.c
diffstat 1 files changed, 10 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Sat May 20 00:01:34 2000 +0000
+++ b/src/keymap.c	Sat May 20 00:03:16 2000 +0000
@@ -1502,14 +1502,10 @@
 	      for (i = 0, i_byte = 0; i < XSTRING (prefix)->size;)
 		{
 		  int i_before = i;
-		  if (STRING_MULTIBYTE (prefix))
-		    FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte);
-		  else
-		    {
-		      c = XSTRING (prefix)->data[i++];
-		      if (c & 0200)
-			c ^= 0200 | meta_modifier;
-		    }
+
+		  FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte);
+		  if (SINGLE_BYTE_CHAR_P (c) && (c & 0200))
+		    c ^= 0200 | meta_modifier;
 		  XVECTOR (copy)->contents[i_before] = make_number (c);
 		}
 	      prefix = copy;
@@ -1738,15 +1734,9 @@
 	  int c;
 	  int i_before = i;
 
-	  if (STRING_MULTIBYTE (keys))
-	    FETCH_STRING_CHAR_ADVANCE (c, keys, i, i_byte);
-	  else
-	    {
-	      c = XSTRING (keys)->data[i++];
-	      if (c & 0200)
-		c ^= 0200 | meta_modifier;
-	    }
-
+	  FETCH_STRING_CHAR_ADVANCE (c, keys, i, i_byte);
+	  if (SINGLE_BYTE_CHAR_P (c) && (c & 0200))
+	    c ^= 0200 | meta_modifier;
 	  XSETFASTINT (XVECTOR (vector)->contents[i_before], c);
 	}
       keys = vector;
@@ -1931,7 +1921,7 @@
       if (SINGLE_BYTE_CHAR_P (without_bits))
 	charset = 0;
       else
-	SPLIT_NON_ASCII_CHAR (without_bits, charset, c1, c2);
+	SPLIT_CHAR (without_bits, charset, c1, c2);
 
       if (charset
 	  && CHARSET_DEFINED_P (charset)
@@ -3034,8 +3024,7 @@
 	    }
 	  else if (complete_char)
 	    {
-	      character
-		= MAKE_NON_ASCII_CHAR (indices[0], indices[1], indices[2]);
+	      character	= MAKE_CHAR (indices[0], indices[1], indices[2]);
 	    }
 	  else
 	    character = 0;
@@ -3178,8 +3167,7 @@
 	      else if (complete_char)
 		{
 		  indices[char_table_depth] = i;
-		  character
-		    = MAKE_NON_ASCII_CHAR (indices[0], indices[1], indices[2]);
+		  character = MAKE_CHAR (indices[0], indices[1], indices[2]);
 		  insert_char (character);
 		}
 	      else