]> code.delx.au - gnu-emacs/commitdiff
(Fmake_char_internal): If CHARSET doesn't have a
authorKenichi Handa <handa@m17n.org>
Thu, 21 Dec 2000 00:12:13 +0000 (00:12 +0000)
committerKenichi Handa <handa@m17n.org>
Thu, 21 Dec 2000 00:12:13 +0000 (00:12 +0000)
generic character and CODE1 is nil, return the smallest character
in CHARSET.

src/charset.c

index 58123244486e5cffed6fa9370e78ec587f915596..21583c8e8c36e4330c0aa7dfbb0a649c34986614 100644 (file)
@@ -967,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);
     }