comparison src/charset.c @ 88817:5756cf8c8828

Doc fixes. (Funify_charset): Extra checking.
author Dave Love <fx@gnu.org>
date Mon, 01 Jul 2002 20:38:35 +0000
parents c2d4566b3cde
children 0382604a03ea
comparison
equal deleted inserted replaced
88816:028259b11c0d 88817:5756cf8c8828
1069 return Qnil; 1069 return Qnil;
1070 } 1070 }
1071 1071
1072 1072
1073 DEFUN ("primary-charset", Fprimary_charset, Sprimary_charset, 0, 0, 0, 1073 DEFUN ("primary-charset", Fprimary_charset, Sprimary_charset, 0, 0, 0,
1074 doc: /* Return the primary charset. */) 1074 doc: /* Return the primary charset (set by `set-primary-charset'). */)
1075 () 1075 ()
1076 { 1076 {
1077 return CHARSET_NAME (CHARSET_FROM_ID (charset_primary)); 1077 return CHARSET_NAME (CHARSET_FROM_ID (charset_primary));
1078 } 1078 }
1079 1079
1080 1080
1081 DEFUN ("set-primary-charset", Fset_primary_charset, Sset_primary_charset, 1081 DEFUN ("set-primary-charset", Fset_primary_charset, Sset_primary_charset,
1082 1, 1, 0, 1082 1, 1, 0,
1083 doc: /* Set the primary charset to CHARSET. */) 1083 doc: /* Set the primary charset to CHARSET.
1084 This determines how unibyte/multibyte conversion is done. See also
1085 function `primary-charset'. */)
1084 (charset) 1086 (charset)
1085 Lisp_Object charset; 1087 Lisp_Object charset;
1086 { 1088 {
1087 int id; 1089 int id;
1088 1090
1091 return Qnil; 1093 return Qnil;
1092 } 1094 }
1093 1095
1094 1096
1095 DEFUN ("charset-plist", Fcharset_plist, Scharset_plist, 1, 1, 0, 1097 DEFUN ("charset-plist", Fcharset_plist, Scharset_plist, 1, 1, 0,
1096 doc: /* Return a property list of CHARSET. */) 1098 doc: /* Return the property list of CHARSET. */)
1097 (charset) 1099 (charset)
1098 Lisp_Object charset; 1100 Lisp_Object charset;
1099 { 1101 {
1100 Lisp_Object attrs; 1102 Lisp_Object attrs;
1101 1103
1116 return plist; 1118 return plist;
1117 } 1119 }
1118 1120
1119 1121
1120 DEFUN ("unify-charset", Funify_charset, Sunify_charset, 1, 2, 0, 1122 DEFUN ("unify-charset", Funify_charset, Sunify_charset, 1, 2, 0,
1121 doc: /* Unify characters of CHARSET with Unicode. */) 1123 doc: /* Unify characters of CHARSET with Unicode.
1124 This means reading the relevant file and installing the table defined
1125 by CHARSET's `:unify-map' property. */)
1122 (charset, unify_map) 1126 (charset, unify_map)
1123 Lisp_Object charset, unify_map; 1127 Lisp_Object charset, unify_map;
1124 { 1128 {
1125 int id; 1129 int id;
1126 struct charset *cs; 1130 struct charset *cs;
1135 CHARSET_UNIFIED_P (cs) = 0; 1139 CHARSET_UNIFIED_P (cs) = 0;
1136 if (NILP (unify_map)) 1140 if (NILP (unify_map))
1137 unify_map = CHARSET_UNIFY_MAP (cs); 1141 unify_map = CHARSET_UNIFY_MAP (cs);
1138 if (STRINGP (unify_map)) 1142 if (STRINGP (unify_map))
1139 load_charset_map_from_file (cs, unify_map, 2); 1143 load_charset_map_from_file (cs, unify_map, 2);
1144 else if (VECTORP (unify_map))
1145 load_charset_map_from_vector (cs, unify_map, 2);
1146 else if (NILP (unify_map))
1147 error ("No unify-map for charset");
1140 else 1148 else
1141 load_charset_map_from_vector (cs, unify_map, 2); 1149 error ("Bad unify-map arg");
1142 CHARSET_UNIFIED_P (cs) = 1; 1150 CHARSET_UNIFIED_P (cs) = 1;
1143 return Qnil; 1151 return Qnil;
1144 } 1152 }
1145 1153
1146 DEFUN ("get-unused-iso-final-char", Fget_unused_iso_final_char, 1154 DEFUN ("get-unused-iso-final-char", Fget_unused_iso_final_char,
1189 1197
1190 DEFUN ("declare-equiv-charset", Fdeclare_equiv_charset, Sdeclare_equiv_charset, 1198 DEFUN ("declare-equiv-charset", Fdeclare_equiv_charset, Sdeclare_equiv_charset,
1191 4, 4, 0, 1199 4, 4, 0,
1192 doc: /* 1200 doc: /*
1193 Declare a charset of DIMENSION, CHARS, FINAL-CHAR is the same as CHARSET. 1201 Declare a charset of DIMENSION, CHARS, FINAL-CHAR is the same as CHARSET.
1194 CHARSET should be defined by `defined-charset' in advance. */) 1202 CHARSET should be defined by `define-charset' in advance. */)
1195 (dimension, chars, final_char, charset) 1203 (dimension, chars, final_char, charset)
1196 Lisp_Object dimension, chars, final_char, charset; 1204 Lisp_Object dimension, chars, final_char, charset;
1197 { 1205 {
1198 int id; 1206 int id;
1199 1207
1294 2, 3, 0, 1302 2, 3, 0,
1295 doc: /* Return a list of charsets in the region between BEG and END. 1303 doc: /* Return a list of charsets in the region between BEG and END.
1296 BEG and END are buffer positions. 1304 BEG and END are buffer positions.
1297 Optional arg TABLE if non-nil is a translation table to look up. 1305 Optional arg TABLE if non-nil is a translation table to look up.
1298 1306
1299 If the region contains invalid multibyte characters,
1300 `unknown' is included in the returned list.
1301
1302 If the current buffer is unibyte, the returned list may contain 1307 If the current buffer is unibyte, the returned list may contain
1303 only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) 1308 only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
1304 (beg, end, table) 1309 (beg, end, table)
1305 Lisp_Object beg, end, table; 1310 Lisp_Object beg, end, table;
1306 { 1311 {
1348 1353
1349 DEFUN ("find-charset-string", Ffind_charset_string, Sfind_charset_string, 1354 DEFUN ("find-charset-string", Ffind_charset_string, Sfind_charset_string,
1350 1, 2, 0, 1355 1, 2, 0,
1351 doc: /* Return a list of charsets in STR. 1356 doc: /* Return a list of charsets in STR.
1352 Optional arg TABLE if non-nil is a translation table to look up. 1357 Optional arg TABLE if non-nil is a translation table to look up.
1353
1354 If the string contains invalid multibyte characters,
1355 `unknown' is included in the returned list.
1356 1358
1357 If STR is unibyte, the returned list may contain 1359 If STR is unibyte, the returned list may contain
1358 only `ascii', `eight-bit-control', and `eight-bit-graphic'. */) 1360 only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
1359 (str, table) 1361 (str, table)
1360 Lisp_Object str, table; 1362 Lisp_Object str, table;
1732 } 1734 }
1733 return NULL; 1735 return NULL;
1734 } 1736 }
1735 1737
1736 1738
1739 /* Fixme: `unknown' can't happen now? */
1737 DEFUN ("split-char", Fsplit_char, Ssplit_char, 1, 1, 0, 1740 DEFUN ("split-char", Fsplit_char, Ssplit_char, 1, 1, 0,
1738 doc: /*Return list of charset and one to three position-codes of CHAR. 1741 doc: /*Return list of charset and one to three position-codes of CHAR.
1739 If CHAR is invalid as a character code, 1742 If CHAR is invalid as a character code,
1740 return a list of symbol `unknown' and CHAR. */) 1743 return a list of symbol `unknown' and CHAR. */)
1741 (ch) 1744 (ch)