X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fmule-charset.c;h=2031052975a38ca6c72c427b3d6154b1568c3ac4;hb=2409cab800d46dd20d2ccf674cee3366ea31a72c;hp=730d44245cc2f9cfb770f67366ce35031b93f0de;hpb=76d414ef9e9609c7a82fd80ba601d83e286db504;p=chise%2Fxemacs-chise.git diff --git a/src/mule-charset.c b/src/mule-charset.c index 730d442..2031052 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1045,7 +1045,7 @@ decode_builtin_char (Lisp_Object charset, int code_point) } int -charset_code_point (Lisp_Object charset, Emchar ch) +charset_code_point (Lisp_Object charset, Emchar ch, int defined_only) { Lisp_Object encoding_table = XCHARSET_ENCODING_TABLE (charset); Lisp_Object ret; @@ -1062,7 +1062,9 @@ charset_code_point (Lisp_Object charset, Emchar ch) int code; if ( CHARSETP (mother) ) - code = charset_code_point (mother, ch); + code = charset_code_point (mother, ch, defined_only); + else if (defined_only) + return -1; else code = ch; if ( ((max == 0) && CHARSETP (mother)) || @@ -2202,16 +2204,17 @@ N defaults to 0 if omitted. } #ifdef UTF2000 -DEFUN ("encode-char", Fencode_char, 2, 2, 0, /* +DEFUN ("encode-char", Fencode_char, 2, 3, 0, /* Return code-point of CHARACTER in specified CHARSET. */ - (character, charset)) + (character, charset, defined_only)) { int code_point; CHECK_CHAR_COERCE_INT (character); charset = Fget_charset (charset); - code_point = charset_code_point (charset, XCHAR (character)); + code_point = charset_code_point (charset, XCHAR (character), + !NILP (defined_only)); if (code_point >= 0) return make_int (code_point); else @@ -2696,8 +2699,7 @@ complex_vars_of_mule_charset (void) build_string ("TIS620 (Thai)"), build_string ("TIS620.2529 (Thai)"), build_string ("tis620"), - Qnil, MIN_CHAR_THAI, MAX_CHAR_THAI, - MIN_CHAR_THAI, 32, Qnil, CONVERSION_96); + Qnil, 0, 0, 0, 32, Qnil, CONVERSION_IDENTICAL); staticpro (&Vcharset_greek_iso8859_7); Vcharset_greek_iso8859_7 = make_charset (LEADING_BYTE_GREEK_ISO8859_7, Qgreek_iso8859_7, 96, 1,