aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-07-04 02:22:42 +0000
committerKenichi Handa2008-07-04 02:22:42 +0000
commit6e8b42de75400d361c8dccc0d91b41b6aceb0dc0 (patch)
tree9a94c5d71ec94a1bd597c4e61e5eb1b6213a3024
parentf27f70ecd301c51667ec2acbed9f9729a26f520a (diff)
downloademacs-6e8b42de75400d361c8dccc0d91b41b6aceb0dc0.tar.gz
emacs-6e8b42de75400d361c8dccc0d91b41b6aceb0dc0.zip
(Fstring_to_unibyte): Delete the arg ACCEPT-LATIN-1.
-rw-r--r--src/fns.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/fns.c b/src/fns.c
index 7511eacb03a..df2e8dbebea 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -1132,17 +1132,15 @@ correct sequence. */)
1132} 1132}
1133 1133
1134DEFUN ("string-to-unibyte", Fstring_to_unibyte, Sstring_to_unibyte, 1134DEFUN ("string-to-unibyte", Fstring_to_unibyte, Sstring_to_unibyte,
1135 1, 2, 0, 1135 1, 1, 0,
1136 doc: /* Return a unibyte string with the same individual chars as STRING. 1136 doc: /* Return a unibyte string with the same individual chars as STRING.
1137If STRING is unibyte, the result is STRING itself. 1137If STRING is unibyte, the result is STRING itself.
1138Otherwise it is a newly created string, with no text properties, 1138Otherwise it is a newly created string, with no text properties,
1139where each `eight-bit' character is converted to the corresponding byte. 1139where each `eight-bit' character is converted to the corresponding byte.
1140If STRING contains a non-ASCII, non-`eight-bit' character, 1140If STRING contains a non-ASCII, non-`eight-bit' character,
1141an error is signaled. 1141an error is signaled. */)
1142If the optional 2nd arg ACCEPT-LATIN-1 is non-nil, a Latin-1 character 1142 (string)
1143doesn't cause an error, but is converted to a byte of same code. */) 1143 Lisp_Object string;
1144 (string, accept_latin_1)
1145 Lisp_Object string, accept_latin_1;
1146{ 1144{
1147 CHECK_STRING (string); 1145 CHECK_STRING (string);
1148 1146
@@ -1150,8 +1148,8 @@ doesn't cause an error, but is converted to a byte of same code. */)
1150 { 1148 {
1151 EMACS_INT chars = SCHARS (string); 1149 EMACS_INT chars = SCHARS (string);
1152 unsigned char *str = (unsigned char *) xmalloc (chars); 1150 unsigned char *str = (unsigned char *) xmalloc (chars);
1153 EMACS_INT converted = str_to_unibyte (SDATA (string), str, chars, 1151 EMACS_INT converted = str_to_unibyte (SDATA (string), str, chars, 0);
1154 ! NILP (accept_latin_1)); 1152
1155 if (converted < chars) 1153 if (converted < chars)
1156 error ("Can't convert the %dth character to unibyte", converted); 1154 error ("Can't convert the %dth character to unibyte", converted);
1157 string = make_unibyte_string (str, chars); 1155 string = make_unibyte_string (str, chars);