summaryrefslogtreecommitdiff
path: root/src/charset.c
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-12-21 00:12:13 +0000
committerKenichi Handa <handa@m17n.org>2000-12-21 00:12:13 +0000
commit3073601217d7ec1536d90c4586dcc3b740096765 (patch)
treec75a720dbf1fa9d6d7e0c7aa2208138f460ec524 /src/charset.c
parent3f9d67a6d4064492b079510df385fb2d87de30b1 (diff)
downloademacs-3073601217d7ec1536d90c4586dcc3b740096765.tar.gz
(Fmake_char_internal): If CHARSET doesn't have a
generic character and CODE1 is nil, return the smallest character in CHARSET.
Diffstat (limited to 'src/charset.c')
-rw-r--r--src/charset.c8
1 files changed, 6 insertions, 2 deletions
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);
}