Mercurial > emacs
comparison src/eval.c @ 79082:b27741b11f5a
(do_autoload): Don't save autoloads.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 14 Oct 2007 18:00:05 +0000 |
parents | 037dc4f731b2 |
children | f19edd342e7b a89507976418 |
comparison
equal
deleted
inserted
replaced
79081:4f36fa10b069 | 79082:b27741b11f5a |
---|---|
464 Lisp_Object val; | 464 Lisp_Object val; |
465 register Lisp_Object args_left; | 465 register Lisp_Object args_left; |
466 struct gcpro gcpro1, gcpro2; | 466 struct gcpro gcpro1, gcpro2; |
467 register int argnum = 0; | 467 register int argnum = 0; |
468 | 468 |
469 if (NILP(args)) | 469 if (NILP (args)) |
470 return Qnil; | 470 return Qnil; |
471 | 471 |
472 args_left = args; | 472 args_left = args; |
473 val = Qnil; | 473 val = Qnil; |
474 GCPRO2 (args, val); | 474 GCPRO2 (args, val); |
2144 void | 2144 void |
2145 do_autoload (fundef, funname) | 2145 do_autoload (fundef, funname) |
2146 Lisp_Object fundef, funname; | 2146 Lisp_Object fundef, funname; |
2147 { | 2147 { |
2148 int count = SPECPDL_INDEX (); | 2148 int count = SPECPDL_INDEX (); |
2149 Lisp_Object fun, queue, first, second; | 2149 Lisp_Object fun; |
2150 struct gcpro gcpro1, gcpro2, gcpro3; | 2150 struct gcpro gcpro1, gcpro2, gcpro3; |
2151 | 2151 |
2152 /* This is to make sure that loadup.el gives a clear picture | 2152 /* This is to make sure that loadup.el gives a clear picture |
2153 of what files are preloaded and when. */ | 2153 of what files are preloaded and when. */ |
2154 if (! NILP (Vpurify_flag)) | 2154 if (! NILP (Vpurify_flag)) |
2164 | 2164 |
2165 /* Value saved here is to be restored into Vautoload_queue. */ | 2165 /* Value saved here is to be restored into Vautoload_queue. */ |
2166 record_unwind_protect (un_autoload, Vautoload_queue); | 2166 record_unwind_protect (un_autoload, Vautoload_queue); |
2167 Vautoload_queue = Qt; | 2167 Vautoload_queue = Qt; |
2168 Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil, Qt); | 2168 Fload (Fcar (Fcdr (fundef)), Qnil, noninteractive ? Qt : Qnil, Qnil, Qt); |
2169 | |
2170 /* Save the old autoloads, in case we ever do an unload. */ | |
2171 queue = Vautoload_queue; | |
2172 while (CONSP (queue)) | |
2173 { | |
2174 first = XCAR (queue); | |
2175 second = Fcdr (first); | |
2176 first = Fcar (first); | |
2177 | |
2178 if (SYMBOLP (first) && CONSP (second) && EQ (XCAR (second), Qautoload)) | |
2179 Fput (first, Qautoload, (XCDR (second))); | |
2180 | |
2181 queue = XCDR (queue); | |
2182 } | |
2183 | 2169 |
2184 /* Once loading finishes, don't undo it. */ | 2170 /* Once loading finishes, don't undo it. */ |
2185 Vautoload_queue = Qt; | 2171 Vautoload_queue = Qt; |
2186 unbind_to (count, Qnil); | 2172 unbind_to (count, Qnil); |
2187 | 2173 |