DEFUN ("primary-charset", Fprimary_charset, Sprimary_charset, 0, 0, 0,
- doc: /* Return the primary charset. */)
+ doc: /* Return the primary charset (set by `set-primary-charset'). */)
()
{
return CHARSET_NAME (CHARSET_FROM_ID (charset_primary));
DEFUN ("set-primary-charset", Fset_primary_charset, Sset_primary_charset,
1, 1, 0,
- doc: /* Set the primary charset to CHARSET. */)
+ doc: /* Set the primary charset to CHARSET.
+This determines how unibyte/multibyte conversion is done. See also
+function `primary-charset'. */)
(charset)
Lisp_Object charset;
{
DEFUN ("charset-plist", Fcharset_plist, Scharset_plist, 1, 1, 0,
- doc: /* Return a property list of CHARSET. */)
+ doc: /* Return the property list of CHARSET. */)
(charset)
Lisp_Object charset;
{
DEFUN ("unify-charset", Funify_charset, Sunify_charset, 1, 2, 0,
- doc: /* Unify characters of CHARSET with Unicode. */)
+ doc: /* Unify characters of CHARSET with Unicode.
+This means reading the relevant file and installing the table defined
+by CHARSET's `:unify-map' property. */)
(charset, unify_map)
Lisp_Object charset, unify_map;
{
unify_map = CHARSET_UNIFY_MAP (cs);
if (STRINGP (unify_map))
load_charset_map_from_file (cs, unify_map, 2);
- else
+ else if (VECTORP (unify_map))
load_charset_map_from_vector (cs, unify_map, 2);
+ else if (NILP (unify_map))
+ error ("No unify-map for charset");
+ else
+ error ("Bad unify-map arg");
CHARSET_UNIFIED_P (cs) = 1;
return Qnil;
}
4, 4, 0,
doc: /*
Declare a charset of DIMENSION, CHARS, FINAL-CHAR is the same as CHARSET.
-CHARSET should be defined by `defined-charset' in advance. */)
+CHARSET should be defined by `define-charset' in advance. */)
(dimension, chars, final_char, charset)
Lisp_Object dimension, chars, final_char, charset;
{
BEG and END are buffer positions.
Optional arg TABLE if non-nil is a translation table to look up.
-If the region contains invalid multibyte characters,
-`unknown' is included in the returned list.
-
If the current buffer is unibyte, the returned list may contain
only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
(beg, end, table)
doc: /* Return a list of charsets in STR.
Optional arg TABLE if non-nil is a translation table to look up.
-If the string contains invalid multibyte characters,
-`unknown' is included in the returned list.
-
If STR is unibyte, the returned list may contain
only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
(str, table)
}
+/* Fixme: `unknown' can't happen now? */
DEFUN ("split-char", Fsplit_char, Ssplit_char, 1, 1, 0,
doc: /*Return list of charset and one to three position-codes of CHAR.
If CHAR is invalid as a character code,