diff options
Diffstat (limited to 'src/fns.c')
| -rw-r--r-- | src/fns.c | 33 |
1 files changed, 26 insertions, 7 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 | ||
| @@ -66,6 +66,7 @@ int use_file_dialog; | |||
| 66 | extern int minibuffer_auto_raise; | 66 | extern int minibuffer_auto_raise; |
| 67 | extern Lisp_Object minibuf_window; | 67 | extern Lisp_Object minibuf_window; |
| 68 | extern Lisp_Object Vlocale_coding_system; | 68 | extern Lisp_Object Vlocale_coding_system; |
| 69 | extern Lisp_Object Vloads_in_progress; | ||
| 69 | 70 | ||
| 70 | Lisp_Object Qstring_lessp, Qprovide, Qrequire; | 71 | Lisp_Object Qstring_lessp, Qprovide, Qrequire; |
| 71 | Lisp_Object Qyes_or_no_p_history; | 72 | Lisp_Object Qyes_or_no_p_history; |
| @@ -1147,7 +1148,18 @@ If STRING is multibyte, the result is STRING itself. | |||
| 1147 | Otherwise it is a newly created string, with no text properties. | 1148 | Otherwise it is a newly created string, with no text properties. |
| 1148 | 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 |
| 1149 | part of a multibyte form), it is converted to the corresponding | 1150 | part of a multibyte form), it is converted to the corresponding |
| 1150 | 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> */) | ||
| 1151 | (string) | 1163 | (string) |
| 1152 | Lisp_Object string; | 1164 | Lisp_Object string; |
| 1153 | { | 1165 | { |
| @@ -1181,7 +1193,8 @@ Otherwise it is a newly created string, with no text properties. | |||
| 1181 | Characters 0200 through 0237 are converted to eight-bit-control | 1193 | Characters 0200 through 0237 are converted to eight-bit-control |
| 1182 | characters of the same character code. Characters 0240 through 0377 | 1194 | characters of the same character code. Characters 0240 through 0377 |
| 1183 | are converted to eight-bit-graphic characters of the same character | 1195 | are converted to eight-bit-graphic characters of the same character |
| 1184 | codes. */) | 1196 | codes. |
| 1197 | This is similar to (decode-coding-string STRING 'binary) */) | ||
| 1185 | (string) | 1198 | (string) |
| 1186 | Lisp_Object string; | 1199 | Lisp_Object string; |
| 1187 | { | 1200 | { |
| @@ -3444,9 +3457,15 @@ The normal messages at start and end of loading FILENAME are suppressed. */) | |||
| 3444 | CHECK_SYMBOL (feature); | 3457 | CHECK_SYMBOL (feature); |
| 3445 | 3458 | ||
| 3446 | /* Record the presence of `require' in this file | 3459 | /* Record the presence of `require' in this file |
| 3447 | even if the feature specified is already loaded. */ | 3460 | even if the feature specified is already loaded. |
| 3448 | LOADHIST_ATTACH (Fcons (Qrequire, feature)); | 3461 | But not more than once in any file, |
| 3449 | 3462 | and not when we aren't loading a file. */ | |
| 3463 | if (! NILP (Vloads_in_progress)) | ||
| 3464 | { | ||
| 3465 | tem = Fcons (Qrequire, feature); | ||
| 3466 | if (NILP (Fmember (tem, Vcurrent_load_list))) | ||
| 3467 | LOADHIST_ATTACH (tem); | ||
| 3468 | } | ||
| 3450 | tem = Fmemq (feature, Vfeatures); | 3469 | tem = Fmemq (feature, Vfeatures); |
| 3451 | 3470 | ||
| 3452 | if (NILP (tem)) | 3471 | if (NILP (tem)) |