1055 |
} |
} |
1056 |
return string; |
return string; |
1057 |
} |
} |
1058 |
|
|
1059 |
|
|
1060 |
|
DEFUN ("string-to-multibyte", Fstring_to_multibyte, Sstring_to_multibyte, |
1061 |
|
1, 1, 0, |
1062 |
|
doc: /* Return a multibyte string with the same individual chars as STRING. |
1063 |
|
If STRING is multibyte, the result is STRING itself. |
1064 |
|
Otherwise it is a newly created string, with no text properties. |
1065 |
|
|
1066 |
|
If STRING is unibyte and contains an 8-bit byte, it is converted to |
1067 |
|
the corresponding multibyte character of charset `eight-bit'. */) |
1068 |
|
(string) |
1069 |
|
Lisp_Object string; |
1070 |
|
{ |
1071 |
|
CHECK_STRING (string); |
1072 |
|
|
1073 |
|
if (! STRING_MULTIBYTE (string)) |
1074 |
|
{ |
1075 |
|
Lisp_Object new_string; |
1076 |
|
int nchars, nbytes; |
1077 |
|
|
1078 |
|
nchars = XSTRING (string)->size; |
1079 |
|
nbytes = parse_str_to_multibyte (XSTRING (string)->data, |
1080 |
|
STRING_BYTES (XSTRING (string))); |
1081 |
|
new_string = make_uninit_multibyte_string (nchars, nbytes); |
1082 |
|
bcopy (XSTRING (string)->data, XSTRING (new_string)->data, |
1083 |
|
STRING_BYTES (XSTRING (string))); |
1084 |
|
if (nbytes != STRING_BYTES (XSTRING (string))) |
1085 |
|
str_to_multibyte (XSTRING (new_string)->data, nbytes, |
1086 |
|
STRING_BYTES (XSTRING (string))); |
1087 |
|
string = new_string; |
1088 |
|
XSTRING (string)->intervals = NULL_INTERVAL; |
1089 |
|
} |
1090 |
|
return string; |
1091 |
|
} |
1092 |
|
|
1093 |
DEFUN ("copy-alist", Fcopy_alist, Scopy_alist, 1, 1, 0, |
DEFUN ("copy-alist", Fcopy_alist, Scopy_alist, 1, 1, 0, |
1094 |
doc: /* Return a copy of ALIST. |
doc: /* Return a copy of ALIST. |
4932 |
defsubr (&Sstring_make_unibyte); |
defsubr (&Sstring_make_unibyte); |
4933 |
defsubr (&Sstring_as_multibyte); |
defsubr (&Sstring_as_multibyte); |
4934 |
defsubr (&Sstring_as_unibyte); |
defsubr (&Sstring_as_unibyte); |
4935 |
|
defsubr (&Sstring_to_multibyte); |
4936 |
defsubr (&Scopy_alist); |
defsubr (&Scopy_alist); |
4937 |
defsubr (&Ssubstring); |
defsubr (&Ssubstring); |
4938 |
defsubr (&Snthcdr); |
defsubr (&Snthcdr); |