From: Kenichi Handa Date: Thu, 21 Dec 2000 00:12:13 +0000 (+0000) Subject: (Fmake_char_internal): If CHARSET doesn't have a X-Git-Tag: emacs-pretest-21.0.95~367 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3073601217d7ec1536d90c4586dcc3b740096765;p=emacs.git (Fmake_char_internal): If CHARSET doesn't have a generic character and CODE1 is nil, return the smallest character in CHARSET. --- diff --git a/src/charset.c b/src/charset.c index 58123244486..21583c8e8c3 100644 --- a/src/charset.c +++ b/src/charset.c @@ -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); }