aboutsummaryrefslogtreecommitdiffstats
path: root/src/lread.c
diff options
context:
space:
mode:
authorJoakim Verona2012-09-03 17:30:17 +0200
committerJoakim Verona2012-09-03 17:30:17 +0200
commit4a37733c693d59a9b83a3fb2d0c7f9461d149f60 (patch)
treea33402e09342f748baebf0e4f5a1e40538e620f4 /src/lread.c
parent5436d1df5e2ba0b4d4f72b03a1cd09b20403654b (diff)
parentdcde497f27945c3ca4ce8c21f655ef6f627acdd2 (diff)
downloademacs-4a37733c693d59a9b83a3fb2d0c7f9461d149f60.tar.gz
emacs-4a37733c693d59a9b83a3fb2d0c7f9461d149f60.zip
upstream
Diffstat (limited to 'src/lread.c')
-rw-r--r--src/lread.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/lread.c b/src/lread.c
index e2ad03b349f..1dd6275684b 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -89,8 +89,6 @@ static Lisp_Object Qget_emacs_mule_file_char;
89 89
90static Lisp_Object Qload_force_doc_strings; 90static Lisp_Object Qload_force_doc_strings;
91 91
92extern Lisp_Object Qinternal_interpreter_environment;
93
94static Lisp_Object Qload_in_progress; 92static Lisp_Object Qload_in_progress;
95 93
96/* The association list of objects read with the #n=object form. 94/* The association list of objects read with the #n=object form.
@@ -189,7 +187,7 @@ static int readbyte_from_string (int, Lisp_Object);
189static int unread_char; 187static int unread_char;
190 188
191static int 189static int
192readchar (Lisp_Object readcharfun, int *multibyte) 190readchar (Lisp_Object readcharfun, bool *multibyte)
193{ 191{
194 Lisp_Object tem; 192 Lisp_Object tem;
195 register int c; 193 register int c;
@@ -2354,9 +2352,9 @@ read_integer (Lisp_Object readcharfun, EMACS_INT radix)
2354static Lisp_Object 2352static Lisp_Object
2355read1 (register Lisp_Object readcharfun, int *pch, int first_in_list) 2353read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
2356{ 2354{
2357 register int c; 2355 int c;
2358 unsigned uninterned_symbol = 0; 2356 bool uninterned_symbol = 0;
2359 int multibyte; 2357 bool multibyte;
2360 2358
2361 *pch = 0; 2359 *pch = 0;
2362 load_each_byte = 0; 2360 load_each_byte = 0;
@@ -3406,7 +3404,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag)
3406 /* Delay handling the bytecode slot until we know whether 3404 /* Delay handling the bytecode slot until we know whether
3407 it is lazily-loaded (we can tell by whether the 3405 it is lazily-loaded (we can tell by whether the
3408 constants slot is nil). */ 3406 constants slot is nil). */
3409 ptr[COMPILED_CONSTANTS] = item; 3407 ASET (vector, COMPILED_CONSTANTS, item);
3410 item = Qnil; 3408 item = Qnil;
3411 } 3409 }
3412 else if (i == COMPILED_CONSTANTS) 3410 else if (i == COMPILED_CONSTANTS)
@@ -3432,7 +3430,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag)
3432 } 3430 }
3433 3431
3434 /* Now handle the bytecode slot. */ 3432 /* Now handle the bytecode slot. */
3435 ptr[COMPILED_BYTECODE] = bytestr; 3433 ASET (vector, COMPILED_BYTECODE, bytestr);
3436 } 3434 }
3437 else if (i == COMPILED_DOC_STRING 3435 else if (i == COMPILED_DOC_STRING
3438 && STRINGP (item) 3436 && STRINGP (item)
@@ -3444,7 +3442,7 @@ read_vector (Lisp_Object readcharfun, int bytecodeflag)
3444 item = Fstring_as_multibyte (item); 3442 item = Fstring_as_multibyte (item);
3445 } 3443 }
3446 } 3444 }
3447 ptr[i] = item; 3445 ASET (vector, i, item);
3448 otem = XCONS (tem); 3446 otem = XCONS (tem);
3449 tem = Fcdr (tem); 3447 tem = Fcdr (tem);
3450 free_cons (otem); 3448 free_cons (otem);
@@ -4253,9 +4251,12 @@ init_lread (void)
4253 { 4251 {
4254 tem = Fexpand_file_name (build_string ("site-lisp"), 4252 tem = Fexpand_file_name (build_string ("site-lisp"),
4255 Vsource_directory); 4253 Vsource_directory);
4256 4254 tem1 = Ffile_exists_p (tem);
4257 if (NILP (Fmember (tem, Vload_path))) 4255 if (!NILP (tem1))
4258 Vload_path = Fcons (tem, Vload_path); 4256 {
4257 if (NILP (Fmember (tem, Vload_path)))
4258 Vload_path = Fcons (tem, Vload_path);
4259 }
4259 } 4260 }
4260 } 4261 }
4261 } /* Vinstallation_directory != Vsource_directory */ 4262 } /* Vinstallation_directory != Vsource_directory */