diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fns.c | 20 |
1 files changed, 16 insertions, 4 deletions
| @@ -1,6 +1,6 @@ | |||
| 1 | /* Random utility Lisp functions. | 1 | /* Random utility Lisp functions. |
| 2 | Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 98, 99, 2000, 2001, 02, 03, 2004 | 2 | Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2000, |
| 3 | Free Software Foundation, Inc. | 3 | 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is part of GNU Emacs. | 5 | This file is part of GNU Emacs. |
| 6 | 6 | ||
| @@ -1148,7 +1148,18 @@ If STRING is multibyte, the result is STRING itself. | |||
| 1148 | Otherwise it is a newly created string, with no text properties. | 1148 | Otherwise it is a newly created string, with no text properties. |
| 1149 | If STRING is unibyte and contains an individual 8-bit byte (i.e. not | 1149 | If STRING is unibyte and contains an individual 8-bit byte (i.e. not |
| 1150 | part of a multibyte form), it is converted to the corresponding | 1150 | part of a multibyte form), it is converted to the corresponding |
| 1151 | multibyte character of charset `eight-bit-control' or `eight-bit-graphic'. */) | 1151 | multibyte character of charset `eight-bit-control' or `eight-bit-graphic'. |
| 1152 | Beware, this often doesn't really do what you think it does. | ||
| 1153 | It is similar to (decode-coding-string STRING 'emacs-mule-unix). | ||
| 1154 | If you're not sure, whether to use `string-as-multibyte' or | ||
| 1155 | `string-to-multibyte', use `string-to-multibyte'. Beware: | ||
| 1156 | (aref (string-as-multibyte "\201") 0) -> 129 (aka ?\201) | ||
| 1157 | (aref (string-as-multibyte "\300") 0) -> 192 (aka ?\300) | ||
| 1158 | (aref (string-as-multibyte "\300\201") 0) -> 192 (aka ?\300) | ||
| 1159 | (aref (string-as-multibyte "\300\201") 1) -> 129 (aka ?\201) | ||
| 1160 | but | ||
| 1161 | (aref (string-as-multibyte "\201\300") 0) -> 2240 | ||
| 1162 | (aref (string-as-multibyte "\201\300") 1) -> <error> */) | ||
| 1152 | (string) | 1163 | (string) |
| 1153 | Lisp_Object string; | 1164 | Lisp_Object string; |
| 1154 | { | 1165 | { |
| @@ -1182,7 +1193,8 @@ Otherwise it is a newly created string, with no text properties. | |||
| 1182 | Characters 0200 through 0237 are converted to eight-bit-control | 1193 | Characters 0200 through 0237 are converted to eight-bit-control |
| 1183 | characters of the same character code. Characters 0240 through 0377 | 1194 | characters of the same character code. Characters 0240 through 0377 |
| 1184 | are converted to eight-bit-graphic characters of the same character | 1195 | are converted to eight-bit-graphic characters of the same character |
| 1185 | codes. */) | 1196 | codes. |
| 1197 | This is similar to (decode-coding-string STRING 'binary) */) | ||
| 1186 | (string) | 1198 | (string) |
| 1187 | Lisp_Object string; | 1199 | Lisp_Object string; |
| 1188 | { | 1200 | { |