Mercurial > emacs
comparison src/eval.c @ 85291:b4736439ea2d
(do_autoload): Don't save autoloads.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sun, 14 Oct 2007 17:20:53 +0000 |
parents | 5039706521c9 |
children | d0d527210b0c a0e466c4d599 |
comparison
equal
deleted
inserted
replaced
85290:691f06f3e509 | 85291:b4736439ea2d |
---|---|
2176 void | 2176 void |
2177 do_autoload (fundef, funname) | 2177 do_autoload (fundef, funname) |
2178 Lisp_Object fundef, funname; | 2178 Lisp_Object fundef, funname; |
2179 { | 2179 { |
2180 int count = SPECPDL_INDEX (); | 2180 int count = SPECPDL_INDEX (); |
2181 Lisp_Object fun, queue, first, second; | 2181 Lisp_Object fun; |
2182 struct gcpro gcpro1, gcpro2, gcpro3; | 2182 struct gcpro gcpro1, gcpro2, gcpro3; |
2183 | 2183 |
2184 /* This is to make sure that loadup.el gives a clear picture | 2184 /* This is to make sure that loadup.el gives a clear picture |
2185 of what files are preloaded and when. */ | 2185 of what files are preloaded and when. */ |
2186 if (! NILP (Vpurify_flag)) | 2186 if (! NILP (Vpurify_flag)) |
2196 | 2196 |
2197 /* Value saved here is to be restored into Vautoload_queue. */ | 2197 /* Value saved here is to be restored into Vautoload_queue. */ |
2198 record_unwind_protect (un_autoload, Vautoload_queue); | 2198 record_unwind_protect (un_autoload, Vautoload_queue); |
2199 Vautoload_queue = Qt; | 2199 Vautoload_queue = Qt; |
2200 Fload (Fcar (Fcdr (fundef)), Qnil, Qt, Qnil, Qt); | 2200 Fload (Fcar (Fcdr (fundef)), Qnil, Qt, Qnil, Qt); |
2201 | |
2202 /* Save the old autoloads, in case we ever do an unload. */ | |
2203 queue = Vautoload_queue; | |
2204 while (CONSP (queue)) | |
2205 { | |
2206 first = XCAR (queue); | |
2207 second = Fcdr (first); | |
2208 first = Fcar (first); | |
2209 | |
2210 if (SYMBOLP (first) && CONSP (second) && EQ (XCAR (second), Qautoload)) | |
2211 Fput (first, Qautoload, (XCDR (second))); | |
2212 | |
2213 queue = XCDR (queue); | |
2214 } | |
2215 | 2201 |
2216 /* Once loading finishes, don't undo it. */ | 2202 /* Once loading finishes, don't undo it. */ |
2217 Vautoload_queue = Qt; | 2203 Vautoload_queue = Qt; |
2218 unbind_to (count, Qnil); | 2204 unbind_to (count, Qnil); |
2219 | 2205 |