changeset 90390:9b61abfe926b

(push_key_description): Fix synching with HEAD.
author Kenichi Handa <handa@m17n.org>
date Mon, 15 May 2006 02:45:29 +0000
parents 146cd8369025
children bcc2042feec2
files src/keymap.c
diffstat 1 files changed, 3 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/src/keymap.c	Wed May 10 20:42:41 2006 +0000
+++ b/src/keymap.c	Mon May 15 02:45:29 2006 +0000
@@ -2120,15 +2120,13 @@
      int force_multibyte;
 {
   unsigned c2;
-  int valid_p;
 
   /* Clear all the meaningless bits above the meta bit.  */
   c &= meta_modifier | ~ - meta_modifier;
   c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier
 	     | meta_modifier | shift_modifier | super_modifier);
 
-  valid_p = SINGLE_BYTE_CHAR_P (c2) || char_valid_p (c2, 0);
-  if (! valid_p)
+  if (! CHARACTERP (make_number (c2)))
     {
       /* KEY_DESCRIPTION_SIZE is large enough for this.  */
       p += sprintf (p, "[%d]", c);
@@ -2220,25 +2218,15 @@
     {
       *p++ = c;
     }
-  else if (CHARACTERP (make_number (c)))
+  else
     {
+      /* Now we are sure that C is a valid character code.  */
       if (NILP (current_buffer->enable_multibyte_characters)
 	  && ! force_multibyte)
 	*p++ = multibyte_char_to_unibyte (c, Qnil);
       else
 	p += CHAR_STRING (c, (unsigned char *) p);
     }
-  else
-    {
-      int bit_offset;
-      *p++ = '\\';
-      /* The biggest character code uses 22 bits.  */
-      for (bit_offset = 21; bit_offset >= 0; bit_offset -= 3)
-	{
-	  if (c >= (1 << bit_offset))
-	    *p++ = ((c & (7 << bit_offset)) >> bit_offset) + '0';
-	}
-    }
 
   return p;
 }