X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/3f62427c0c1a2357fa85dde79db5f6a15717858f..3073601217d7ec1536d90c4586dcc3b740096765:/src/charset.c diff --git a/src/charset.c b/src/charset.c index 329f7fd022..21583c8e8c 100644 --- a/src/charset.c +++ b/src/charset.c @@ -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); }