]> code.delx.au - gnu-emacs/blobdiff - src/charset.c
(Fmake_char_internal): If CHARSET doesn't have a
[gnu-emacs] / src / charset.c
index 329f7fd022194d11f7c6217e2a96078977cbf012..21583c8e8c36e4330c0aa7dfbb0a649c34986614 100644 (file)
@@ -597,17 +597,13 @@ get_new_private_charset_id (dimension, width)
 
   if (dimension == 1)
     {
-      if (width == 1)
-       from = LEADING_CODE_EXT_11, to = LEADING_CODE_EXT_12;
-      else
-       from = LEADING_CODE_EXT_12, to = LEADING_CODE_EXT_21;
+      from = LEADING_CODE_EXT_11;
+      to = LEADING_CODE_EXT_21;
     }
   else
     {
-      if (width == 1)
-       from = LEADING_CODE_EXT_21, to = LEADING_CODE_EXT_22;
-      else
-       from = LEADING_CODE_EXT_22, to = LEADING_CODE_EXT_MAX + 1;
+      from = LEADING_CODE_EXT_21;
+      to = LEADING_CODE_EXT_MAX + 1;
     }
 
   for (charset = from; charset < to; charset++)
@@ -850,7 +846,7 @@ DEFUN ("find-charset-region", Ffind_charset_region, Sfind_charset_region,
 BEG and END are buffer positions.\n\
 Optional arg TABLE if non-nil is a translation table to look up.\n\
 \n\
-If the region contains invalid multiybte characters,\n\
+If the region contains invalid multibyte characters,\n\
 `unknown' is included in the returned list.\n\
 \n\
 If the current buffer is unibyte, the returned list may contain\n\
@@ -906,7 +902,7 @@ DEFUN ("find-charset-string", Ffind_charset_string, Sfind_charset_string,
   "Return a list of charsets in STR.\n\
 Optional arg TABLE if non-nil is a translation table to look up.\n\
 \n\
-If the region contains invalid multiybte characters,\n\
+If the string contains invalid multibyte characters,\n\
 `unknown' is included in the returned list.\n\
 \n\
 If STR is unibyte, the returned list may contain\n\
@@ -971,13 +967,17 @@ DEFUN ("make-char-internal", Fmake_char_internal, Smake_char_internal, 1, 3, 0,
     }
   else if (charset_id == CHARSET_8_BIT_CONTROL)
     {
-      if (c1 < 0x80 || c1 > 0x9F)
+      if (NILP (code1))
+       c1 = 0x80;
+      else if (c1 < 0x80 || c1 > 0x9F)
        goto invalid_code_posints;
       return make_number (c1);
     }
   else if (charset_id == CHARSET_8_BIT_GRAPHIC)
     {
-      if (c1 < 0xA0 || c1 > 0xFF)
+      if (NILP (code1))
+       c1 = 0xA0;
+      else if (c1 < 0xA0 || c1 > 0xFF)
        goto invalid_code_posints;
       return make_number (c1);
     }