Mercurial > hg > xemacs-beta
comparison src/lread.c @ 251:677f6a0ee643 r20-5b24
Import from CVS: tag r20-5b24
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:19:59 +0200 |
parents | 83b3d10dcba9 |
children | 11cf20601dec |
comparison
equal
deleted
inserted
replaced
250:f385a461c9aa | 251:677f6a0ee643 |
---|---|
49 | 49 |
50 Lisp_Object Qread_char, Qstandard_input; | 50 Lisp_Object Qread_char, Qstandard_input; |
51 Lisp_Object Qvariable_documentation; | 51 Lisp_Object Qvariable_documentation; |
52 #define LISP_BACKQUOTES | 52 #define LISP_BACKQUOTES |
53 #ifdef LISP_BACKQUOTES | 53 #ifdef LISP_BACKQUOTES |
54 /* FSFmacs says: | 54 /* |
55 | |
56 Nonzero means inside a new-style backquote | 55 Nonzero means inside a new-style backquote |
57 with no surrounding parentheses. | 56 with no surrounding parentheses. |
58 Fread initializes this to zero, so we need not specbind it | 57 Fread initializes this to zero, so we need not specbind it |
59 or worry about what happens to it when there is an error. | 58 or worry about what happens to it when there is an error. |
60 | 59 |
61 But this is fucking typical Stallman bogosity. Nested | 60 XEmacs: |
62 backquotes are perfectly legal and fail utterly with | 61 Nested backquotes are perfectly legal and fail utterly with |
63 this silliness. */ | 62 this silliness. */ |
64 static int new_backquote_flag, old_backquote_flag; | 63 static int new_backquote_flag, old_backquote_flag; |
65 Lisp_Object Qbackquote, Qbacktick, Qcomma, Qcomma_at, Qcomma_dot; | 64 Lisp_Object Qbackquote, Qbacktick, Qcomma, Qcomma_at, Qcomma_dot; |
66 #endif | 65 #endif |
67 Lisp_Object Qvariable_domain; /* I18N3 */ | 66 Lisp_Object Qvariable_domain; /* I18N3 */ |
152 static int load_byte_code_version; | 151 static int load_byte_code_version; |
153 | 152 |
154 /* An array describing all known built-in structure types */ | 153 /* An array describing all known built-in structure types */ |
155 static structure_type_dynarr *the_structure_type_dynarr; | 154 static structure_type_dynarr *the_structure_type_dynarr; |
156 | 155 |
157 #if 0 /* FSFmacs defun hack */ | 156 #if 0 /* FSF defun hack */ |
158 /* When nonzero, read conses in pure space */ | 157 /* When nonzero, read conses in pure space */ |
159 static int read_pure; | 158 static int read_pure; |
160 #endif | 159 #endif |
161 | 160 |
162 #if 0 /* FSFmacs bogosity */ | 161 #if 0 /* FSF stuff */ |
163 /* For use within read-from-string (this reader is non-reentrant!!) */ | 162 /* For use within read-from-string (this reader is non-reentrant!!) */ |
164 static int read_from_string_index; | 163 static int read_from_string_index; |
165 static int read_from_string_limit; | 164 static int read_from_string_limit; |
166 #endif | 165 #endif |
167 | 166 |
172 | 171 |
173 This approach is not only kludgy, but it in general won't work | 172 This approach is not only kludgy, but it in general won't work |
174 correctly because there's no stack of remembered #@-quoted-strings | 173 correctly because there's no stack of remembered #@-quoted-strings |
175 and those strings don't generally appear in the file in the same | 174 and those strings don't generally appear in the file in the same |
176 order as their #$ references. (Yes, that is amazingly stupid too. | 175 order as their #$ references. (Yes, that is amazingly stupid too. |
177 WHY IN THE FUCKING HELL CAN'T RMS EVER IMPLEMENT ANYTHING IN A SANE | 176 |
178 WAY? It would be trivially easy to always encode the #@ string | 177 It would be trivially easy to always encode the #@ string |
179 [which is a comment, anyway] in the middle of the (#$ . INT) cons | 178 [which is a comment, anyway] in the middle of the (#$ . INT) cons |
180 reference. That way, it would be really easy to implement | 179 reference. That way, it would be really easy to implement |
181 load-force-doc-string in a non-kludgy way by just retrieving the | 180 load-force-doc-string in a non-kludgy way by just retrieving the |
182 string immediately, because it's delivered on a silver platter.) | 181 string immediately, because it's delivered on a silver platter.) |
183 | 182 |
583 { | 582 { |
584 message_p = 1; | 583 message_p = 1; |
585 last_file_loaded = file; | 584 last_file_loaded = file; |
586 pure_usage = purespace_usage (); | 585 pure_usage = purespace_usage (); |
587 } | 586 } |
588 /*#endif /* DEBUG_XEMACS */ | 587 /*#endif / * DEBUG_XEMACS */ |
589 | 588 |
590 /* If file name is magic, call the handler. */ | 589 /* If file name is magic, call the handler. */ |
591 handler = Ffind_file_name_handler (file, Qload); | 590 handler = Ffind_file_name_handler (file, Qload); |
592 if (!NILP (handler)) | 591 if (!NILP (handler)) |
593 RETURN_UNGCPRO (call5 (handler, Qload, file, no_error, | 592 RETURN_UNGCPRO (call5 (handler, Qload, file, no_error, |
834 message_append (" (%d)", purespace_usage() - pure_usage); | 833 message_append (" (%d)", purespace_usage() - pure_usage); |
835 else | 834 else |
836 message ("Loading %s ...done (%d)", XSTRING_DATA (file), | 835 message ("Loading %s ...done (%d)", XSTRING_DATA (file), |
837 purespace_usage() - pure_usage); | 836 purespace_usage() - pure_usage); |
838 } | 837 } |
839 /*#endif /* DEBUG_XEMACS */ | 838 /*#endif / * DEBUG_XEMACS */ |
840 | 839 |
841 if (!noninteractive) | 840 if (!noninteractive) |
842 PRINT_LOADING_MESSAGE ("done"); | 841 PRINT_LOADING_MESSAGE ("done"); |
843 | 842 |
844 UNGCPRO; | 843 UNGCPRO; |
984 fd = access (fn, mode); | 983 fd = access (fn, mode); |
985 else | 984 else |
986 #ifdef DOS_NT | 985 #ifdef DOS_NT |
987 fd = open (fn, O_RDONLY | O_BINARY, 0); | 986 fd = open (fn, O_RDONLY | O_BINARY, 0); |
988 #else | 987 #else |
989 fd = open (fn, O_RDONLY, 0); | 988 fd = open (fn, O_RDONLY | OPEN_BINARY, 0); |
990 #endif | 989 #endif |
991 | 990 |
992 if (fd >= 0) | 991 if (fd >= 0) |
993 { | 992 { |
994 /* We succeeded; return this descriptor and filename. */ | 993 /* We succeeded; return this descriptor and filename. */ |