Mercurial > hg > xemacs-beta
diff src/lread.c @ 380:8626e4521993 r21-2-5
Import from CVS: tag r21-2-5
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:07:10 +0200 |
parents | 6240c7796c7a |
children | 74fd4e045ea6 |
line wrap: on
line diff
--- a/src/lread.c Mon Aug 13 11:06:08 2007 +0200 +++ b/src/lread.c Mon Aug 13 11:07:10 2007 +0200 @@ -29,11 +29,9 @@ #include "buffer.h" #include "bytecode.h" -#include "commands.h" -#include "insdel.h" +#include "elhash.h" #include "lstream.h" #include "opaque.h" -#include <paths.h> #ifdef FILE_CODING #include "file-coding.h" #endif @@ -401,22 +399,18 @@ something to `funcall', but who would really do that? As they say in law, we've made a "good-faith effort" to unfuckify ourselves. And doing it this way avoids screwing - up args to `make-hashtable' and such. As it is, we have to + up args to `make-hash-table' and such. As it is, we have to add an extra Ebola check in decode_weak_list_type(). --ben */ - if (EQ (el, Qassoc)) - el = Qold_assoc; - if (EQ (el, Qdelq)) - el = Qold_delq; + if (EQ (el, Qassoc)) el = Qold_assoc; + else if (EQ (el, Qdelq)) el = Qold_delq; #if 0 /* I think this is a bad idea because it will probably mess with keymap code. */ - if (EQ (el, Qdelete)) - el = Qold_delete; + else if (EQ (el, Qdelete)) el = Qold_delete; #endif - if (EQ (el, Qrassq)) - el = Qold_rassq; - if (EQ (el, Qrassoc)) - el = Qold_rassoc; + else if (EQ (el, Qrassq)) el = Qold_rassq; + else if (EQ (el, Qrassoc)) el = Qold_rassoc; + XVECTOR_DATA (vector)[i] = el; } } @@ -470,11 +464,11 @@ Lisp_Object doc; assert (COMPILED_FUNCTIONP (john)); - if (CONSP (XCOMPILED_FUNCTION (john)->bytecodes)) + if (CONSP (XCOMPILED_FUNCTION (john)->instructions)) { struct gcpro ngcpro1; Lisp_Object juan = (pas_de_lache_ici - (fd, XCOMPILED_FUNCTION (john)->bytecodes)); + (fd, XCOMPILED_FUNCTION (john)->instructions)); Lisp_Object ivan; NGCPRO1 (juan); @@ -482,7 +476,7 @@ if (!CONSP (ivan)) signal_simple_error ("invalid lazy-loaded byte code", ivan); /* Remember to purecopy; see above. */ - XCOMPILED_FUNCTION (john)->bytecodes = Fpurecopy (XCAR (ivan)); + XCOMPILED_FUNCTION (john)->instructions = Fpurecopy (XCAR (ivan)); /* v18 or v19 bytecode file. Need to Ebolify. */ if (XCOMPILED_FUNCTION (john)->flags.ebolified && VECTORP (XCDR (ivan))) @@ -793,7 +787,7 @@ if (purify_flag && noninteractive) { if (EQ (last_file_loaded, file)) - message_append (" (%ld)", + message_append (" (%ld)", (unsigned long) (purespace_usage() - pure_usage)); else message ("Loading %s ...done (%ld)", XSTRING_DATA (file), @@ -848,10 +842,11 @@ if (!NILP (mode)) CHECK_NATNUM (mode); - locate_file (path_list, filename, - ((NILP (suffixes)) ? "" : - (char *) (XSTRING_DATA (suffixes))), - &tp, (NILP (mode) ? R_OK : XINT (mode))); + locate_file (path_list, + filename, + NILP (suffixes) ? "" : (char *) XSTRING_DATA (suffixes), + &tp, + NILP (mode) ? R_OK : XINT (mode)); return tp; } @@ -860,8 +855,7 @@ static Lisp_Object locate_file_refresh_hashing (Lisp_Object str) { - Lisp_Object hash = - make_directory_hash_table ((char *) XSTRING_DATA (str)); + Lisp_Object hash = make_directory_hash_table ((char *) XSTRING_DATA (str)); Fput (str, Qlocate_file_hash_table, hash); return hash; } @@ -872,7 +866,7 @@ locate_file_find_directory_hash_table (Lisp_Object str) { Lisp_Object hash = Fget (str, Qlocate_file_hash_table, Qnil); - if (NILP (Fhashtablep (hash))) + if (! HASH_TABLEP (hash)) return locate_file_refresh_hashing (str); return hash; } @@ -904,7 +898,7 @@ default-directory to be something non-absolute ... */ { if (NILP (filename)) - /* NIL means current dirctory */ + /* NIL means current directory */ filename = current_buffer->directory; else filename = Fexpand_file_name (filename, @@ -1119,7 +1113,7 @@ for (pathtail = path; !NILP (pathtail); pathtail = Fcdr (pathtail)) { Lisp_Object pathel = Fcar (pathtail); - Lisp_Object hashtab; + Lisp_Object hash_table; Lisp_Object tail; int found; @@ -1138,13 +1132,13 @@ continue; } - hashtab = locate_file_find_directory_hash_table (pathel); + hash_table = locate_file_find_directory_hash_table (pathel); /* Loop over suffixes. */ for (tail = suffixtab, found = 0; !found && CONSP (tail); tail = XCDR (tail)) { - if (!NILP (Fgethash (XCAR (tail), hashtab, Qnil))) + if (!NILP (Fgethash (XCAR (tail), hash_table, Qnil))) found = 1; } @@ -1274,9 +1268,9 @@ { /* This function can GC */ REGISTER Emchar c; - REGISTER Lisp_Object val; + REGISTER Lisp_Object val = Qnil; int speccount = specpdl_depth (); - struct gcpro gcpro1; + struct gcpro gcpro1, gcpro2; struct buffer *b = 0; if (BUFFERP (readcharfun)) @@ -1293,7 +1287,7 @@ #ifdef COMPILED_FUNCTION_ANNOTATION_HACK Vcurrent_compiled_function_annotation = Qnil; #endif - GCPRO1 (sourcename); + GCPRO2 (val, sourcename); LOADHIST_ATTACH (sourcename); @@ -2401,11 +2395,11 @@ obj = read0(readcharfun); /* the call to `featurep' may GC. */ - GCPRO2(fexp, obj); - tem = call1(Qfeaturep, fexp); + GCPRO2 (fexp, obj); + tem = call1 (Qfeaturep, fexp); UNGCPRO; - if (c == '+' && NILP(tem)) goto retry; + if (c == '+' && NILP(tem)) goto retry; if (c == '-' && !NILP(tem)) goto retry; return obj; } @@ -2991,7 +2985,7 @@ Vvalues = Qnil; load_in_progress = 0; - + Vload_descriptor_list = Qnil; /* kludge: locate-file does not work for a null load-path, even if