diff options
author | Kenichi Handa <handa@m17n.org> | 2008-07-04 02:22:42 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 2008-07-04 02:22:42 +0000 |
commit | 6e8b42de75400d361c8dccc0d91b41b6aceb0dc0 (patch) | |
tree | 9a94c5d71ec94a1bd597c4e61e5eb1b6213a3024 /src/fns.c | |
parent | f27f70ecd301c51667ec2acbed9f9729a26f520a (diff) | |
download | emacs-6e8b42de75400d361c8dccc0d91b41b6aceb0dc0.tar.gz |
(Fstring_to_unibyte): Delete the arg ACCEPT-LATIN-1.
Diffstat (limited to 'src/fns.c')
-rw-r--r-- | src/fns.c | 14 |
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. */) } DEFUN ("string-to-unibyte", Fstring_to_unibyte, Sstring_to_unibyte, - 1, 2, 0, + 1, 1, 0, doc: /* Return a unibyte string with the same individual chars as STRING. If STRING is unibyte, the result is STRING itself. Otherwise it is a newly created string, with no text properties, where each `eight-bit' character is converted to the corresponding byte. If STRING contains a non-ASCII, non-`eight-bit' character, -an error is signaled. -If the optional 2nd arg ACCEPT-LATIN-1 is non-nil, a Latin-1 character -doesn't cause an error, but is converted to a byte of same code. */) - (string, accept_latin_1) - Lisp_Object string, accept_latin_1; +an error is signaled. */) + (string) + Lisp_Object string; { CHECK_STRING (string); @@ -1150,8 +1148,8 @@ doesn't cause an error, but is converted to a byte of same code. */) { EMACS_INT chars = SCHARS (string); unsigned char *str = (unsigned char *) xmalloc (chars); - EMACS_INT converted = str_to_unibyte (SDATA (string), str, chars, - ! NILP (accept_latin_1)); + EMACS_INT converted = str_to_unibyte (SDATA (string), str, chars, 0); + if (converted < chars) error ("Can't convert the %dth character to unibyte", converted); string = make_unibyte_string (str, chars); |